Lec 2
Lec 2
PYTHON
Done By: Thana Abdulhalim
01
Python Syntax
Spaces Variables Comments
Python
Indentation
● Indentation refers to the spaces at the
beginning of a code line.
● Where in other programming
languages the indentation in code is
for readability only, the indentation in
Python is very important.
● Python uses indentation to indicate a
block of code.
Error Example
Python Variables
● In Python, variables are
created when you assign a
value to it
● Create a comment to
03 explain the code
02
Python Variables
Names Multiple output global
Variables
How to use variables in python
Example
Variable Names
A variable can have a short name (like x and y) or a
more descriptive name (age, carname, total_volume).
Rules for Python variables:
03 04
Q.01
Explain the Indentation
system
Q.02
How to print 2 different typed
variables in the same line
Q.03
Name 3 of python unique
data types
Q.04
What are python variables
rules
Thanks!
Do you have any questions?