Tamilnadu Samacheer Kalvi 12th Computer Science Notes Chapter 5 Python -Variables and Operators Notes

Key features of Python:

  • It is a general purpose programming language which can be, used for both scientific and non-scientific programming.
  • It is a platform independent programming language.
  • The programs written in Python are easily readable and understandable.

Python Coding:

  • In Python, programs can be written in two ways namely Interactive mode and Script mode.
  • The Interactive mode allows us to write codes in Python command prompt ( > > >) whereas in script mode programs can be written and stored as separate file with the extension . py and executed.
  • Script mode is used to create and edit python source file.

Tokens.

  • Python breaks each logical line into a sequence of elementary lexical components known as Tokens.
  • The normal token types are
    1. Identifiers
    2. Keywords K
    3. Operators K
    4. Delimiters
    5. Literals

Operators used in Python :

  • Arithmetic operators
  • Relational or Comparative operator
  • Logical operators
  • Assignment operators
  • Conditional operator

Input-output functions:

  • The input () function helps to enter data at run time by the user .
  • The output function print () is used to display the result of the program on the screen after execution.

Comment statement:
# are considered as comments and ignored by the Python interpreter.

Samacheer Kalvi 12th Computer Science Notes