Page 95 - Digicode_AI_class_7
P. 95
False
Syntax: Test Expression 1 Statement 3
if (Test Expression1):
if (Test Expression2):
True
Indented block 1
else: False
Test Expression 2 Statement 2
Indented block 2
else:
Indented block 3 True
Statement 1
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

