Page 95 - ThinkGPT_V2.1_C7_Flipbook
P. 95
Start
Syntax: if condition 1 False block 3
if (condition 1):
if (condition 2):
True
Indented block 1
else: False
if condition 2 block 2
Indented block 2
else:
Indented block 3 True
block 1
Stop
Program: To find out if the student is selected for the college or not based on the given
conditions:
1. Selected if age > 18 and marks > 65.
2. Not selected if age > 18 and marks < 65.
3. Not selected if age < 18.
On running the above program, you will get the following output:
More on Python 93

