For any queries you can reach us at infovistarindia@gmail.com / WhatsApp us: +919158876092

Barebone of a Python

Barebone of a Python Program

Barebone of a Python
  1. Expression:
    Expression is evaluated and produces the results.
    Ex: (10=2)/2
  2. Statements:
    Indicates that we are doing something.
    Ex: a=10
    print("Calling in proper sequence")
  3. Comments:
    Comments are readable messages for a programmer but it is overlooked by the python interpreter.
    a. Single line comment (#)
    b. Multi-line comment (''' ''')
    Ex: #this is a single-line comment
    ''' this is
    multiple '''
  4. Function:
    A function is a block of code which only runs when it is called. Ex: getStudentMarks()
  5. Block & Indentation:
    A group of statements in block indentation at the same level creates a block. Ex: all the statements that are under the function getStudentMarks()