Basics of Python Programming
Basics of Python Programming
Example-
age = int(input(‘enter your age’)) C = age+2 #will not produce any error
Indentation:-
Indentation refers to the spaces applied at the beginning of a code line. In other
programming languages the indentation in code is for readability only, where as the
indentation in Python is very important.
Python uses indentation to indicate a block of code or used in block of codes.
Example(1)-
if 3 > 2:
print(“Three is greater than two!") //syntax error due to not indented
Example(2)-
if 3 > 2:
print(“Three is greater than two!") //indented so no error
Tokens
Tokens