Do these exercises in the interpreter
print('you are too old!')
>>> age = 18
>>> if age == 12:
. . . print('Hello')
. . . else:
. . . print('Goodbye')
>>> age = 12
>>> if age == 11:
. . . print("You are 11")
. . . elif age == 12:
. . . print("You are 12")
. . . elif age < 13:
. . . print("You are younger than 13")
. . . else:
. . . print("You are older than 13")
What will be printed?
>>> if age == 10 or age == 11 or age == 12:
. . . print("You are %s" % age)
>>> if age >= 10 and age <= 12:
. . . print("You are %s" % age)
this is block 1
this is block 1
this is block 2
this is block 2
this is block 2
this is block 3
this is block 3
this is block 2
this is block 1
this is block 1