Nesting

NESTING
NestingΒ 
isΒ 
theΒ 
processΒ 
ofΒ 
addingΒ 
anΒ 
if-elseΒ 
statementΒ 
withinΒ 
anotherΒ 
if-else.Β 
TheΒ 
secondΒ 
statementΒ 
getsΒ 
evaluatedΒ 
whenΒ 
theΒ 
firstΒ 
conditionΒ 
isΒ 
True.
Β 
TheΒ 
firstΒ 
ifΒ 
statementΒ 
isΒ 
commonlyΒ 
calledΒ 
asΒ 
"outerΒ 
if"
Β 
andΒ 
theΒ 
blockΒ 
withinΒ 
itΒ 
isΒ 
calledΒ 
"nestedΒ 
/Β 
innerΒ 
if"
.
if condition1:
   if condition2:
        StatementA
   else:
        StatementB
else:
   if condition3:
        StatementC
   else:
        StatementD
age=10
height=160
if age >= 10:
    if height > 150:
        print('You get roller coaster!')
    else:
        print('You get water rides!')
else:
    print('Sorry, no rides for you!')