Hello Friends,
Python Syntax and Indentation
Python uses indentation instead of brackets to define code blocks.
Correct Example
if 10 > 5:
print("10 is greater than 5")
Incorrect Example
if 10 > 5:
print("Error")
=======================================================================Variables and Data Types
Variables store data values in Python.
Common Data Types
- int
- float
- string
- boolean
Example
age = 30 name = "Chandan" price = 99.50 is_active = True print(age) print(name) print(price) print(is_active)
No comments:
Post a Comment