Block and Indentation

Codes 
can 
be 
written 
inside 
blocks. 
So 
python 
runs 
only 
a 
particular 
block 
of 
code
.
Indentation
 
refers 
to 
a 
fixed 
amount 
of 
space 
added 
at 
the 
beginning 
of 
the 
code 
that 
indicates 
a 
particular 
block 
of 
code.

if else block

The 
if-else 
statement 
in 
Python 
executes 
either 
the 
True 
or 
the 
False 
part 
of 
a 
given 
condition.
If 
the 
condition 
is 
True
, 
the 
if 
block 
executes
, 
and 
if 
the 
condition 
is 
False
, 
the 
else 
block 
executes
.
It 
is 
not 
necessary 
to 
have 
an 
else 
condition.
if condition1:
   Statement1
else:
   Statement2
number = 99
if number>0:
   print("Positive Number")
else:
   print("Negative Number")

Flowchart

It 
is 
a 
diagram
 
showing 
the 
flow 
of 
the 
program.
It 
is 
a 
blueprint
 
of 
the 
program 
written.
Certain 
shapes 
are 
used 
to 
draw 
flowcharts, 
and 
these 
shapes 
have 
the 
meaning 
as 
follows.
Oval
 
- 
Start/Stop
Rectangle
 
- 
To 
perform 
assignment 
statements
Parallelogram
 
- 
To 
take 
input 
and 
use 
print 
commands
Diamond
 
- 
To 
evaluate 
a 
condition
Arrows
 
- 
To 
show 
the 
flow 
of 
the 
program
CheatSheet