Python Programming Notes-Complete Guide for Students

 Introduction to Python Programming 

href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjB7kEt1WkN7G1LEZLYyMw9uWxPvLw-39TiMiLTznVf0_tVbEDNAZUB4G1W02uTZoUt0kTa1VYS07gfg5bU8o43Se_E8O1bQVghPzrEQNnwxt5UE3Kfjj7Lo9MNILODu8scmJUPP5dkRUmXtRUyjlgPkUcKEb0QlLiPbcRYLp4KXLieIeNwSOxDKA4vwlk/s800/hd-python-logo-symbol-transparent-png-735811696257415dbkifcuokn.png" style="margin-left: 1em; margin-right: 1em;">

Program: Program is the set of instruction or commands that a computer follows to perform a specific tasks or job.

Instructions: An Instructions or commands is a word , or statements or set of symbols written using a programming language that tells the computer what to do.
ex: print("hello")

Programming: Programming is the process of designing, writing, testing, debugging, and maintaining a set of instructions (called a program or code) that tells a computer how to perform a specific task or a particular problem.
                                           In simple words : Programming is the process or communicating with a computer by giving it step-by-step instructions to perform a task.

Programming Language: A programming language is a formal language used to write instructions that tell a computer what to do and how to perform specific tasks.
                                              A computer cannot understand human languages directly in the same way humans do. Therefore, programmers use programming languages to communicate instructions to a computer. These instructions are written in the form of a program to perform different tasks.
Note 1 : 
Formal Language: A formal language is a language that follows a fixed set of rules for writing and interpreting expressions. 
Examples of Programming Languages:
  • Python: Used in Artificial Intelligence, data science and automation.
  • C Programming: Used in system programming and embedded systems.
  • C++: Used in game development and software development.
  • Java: Used in application and enterprise software development.
  • JavaScript: Used to create Interactive websites. 
Types of Programming Languages: 
  • Low-Level Languages: These languages are closer to the computer's hardware. Example include Machine Language and Assembly Language. 
  • High-Level-Language: These languages are easier for humans to read, write, and understand. Examples: Python, C/C++, Java, JavaScript, etc. 
Computer Language: A computer language is a language used to communicate with a computer and give it instructions to perform different tasks.
Types of Computer Languages: 
  1. Machine Language: Machine language is the lowest-level language that consists of binary digits (0 and 1) and is directly understood by the computer.                          Example: 101010101011   
                Advantage of Machine Language:
  • It is directly understood by the computer
  • It executes instruction very fast.
  • It doesn't require a translator.
          Disadvantage of Machine Language:
  • Difficult to understand: It uses only binary digits (0 and 1).
  • It is default to write and debug programs.
  • Machine dependent: Instructions designed for one processor may not work on another.
    Assembly Language: Assembly language is a low-level programming language that uses mnemonic codes (short symbolic instructions) instead of binary digits(0and 1) to communicate with a computer.
Example: MOV A, B   and ADD A,C
Here: MOV means move data and ADD means add values.
Advantage of Assembly Language: 
  • Easy to understand: It is easier to read than machine language.
  • Fast Execution: It can produce efficient machine instructions. 
  • Memory Efficient: It is useful when programs need careful control over memory and resources. 
Disadvantages of Assembly Languages:
  • Difficult to learn: It requires knowledge of computer hardware.
  • Machine -dependent: Assembly code for one processor may not work on another.
  • Assembler required: An assembler translates assembly language into machine language.
High-Level Language: A high level language is a programming language that is easy for humans to read, write, understand, and learn. It uses English-like words and mathematical symbols to write programs.
Example:-Python, Java, C/C++, JavaScript, etc.
Advantage of High -Level Language:
  • Easy to Learn: It is easier to learn and understand than machine language.
  • Easy to debug: Errors in a program can be identified and corrected more easily.
  • Easy to maintain: Programs can be modified and updated easily.
  • Portable: Many high-level programs can run on different operating systems with little or no modification, provided the required interpreter or compiler is available.
    Disadvantage of High -Level Language:
  • Requires translation: It generally requires a compiler or interpreter to translates the program into a form the computer can execute.
  • Less direct hardware control: It usually provides less direct control over computer hardware than low-level languages.
  • May use more resources: Some programs may require more memory and processing power.
Translator: A translator is a system software that converts a program written in a programming language into machine language so that the computer can understand and execute it.
Types of translator:
  1. Compiler: A compiler is a translator that translates an entire program into machine-level language (object code) before execution. Example: C and C++ Programming languages use compilers to translate source code into executable machine code.
  2. Interpreter: An Interpreter translates and executes a program one statement at a time. It stops when it find errors. Example: Python and JavaScript

Comments

Popular posts from this blog

Introduction to ICT (Information and Communication Technology)-Class 9

Entrepreneur Skills Notes for Class 9 Students

Digital Presentation Notes (LibreOffice Impress)-Class 9