Professional Documents
Culture Documents
In the Idle editor, type in the small program (or copy and paste it) from the first column of the
table. When typing these programs, be very careful to type exactly what is shown.
Answer the questions in the second column of the table along with any notes you would like
to include. Then erase the program you typed and type in the next.
There is no need to save these programs but save this completed document and show me!
party = input("Are you ready to party? ") How many conditions are there
if party == "yes" or party == "yeah" or party == "alright": for this if structure?
print("Let's party!") There are 3 conditions in this
else: if structure. The “yes”,
print("Well go get ready!"); “yeah” and the “alright”.
age = int(input("How old are you? ")); How many conditions are there
license = input("Do you have your license? "); for this if structure?
if age >= 16 and license == "yes": There are 2 conditions under
print("You can drive."); this structure. The age and
else: the license.
print("You can not drive."); How many of them have to be
true to say, “You can drive.”?
Both of these if statements
have to be true for it to let
you drive. For e.g. If age is 18
and no license it won’t let
you drive but if both of them
are true you can drive.