June 2002
Beginner to intermediate
640 pages
14h 24m
English
In Chapter 4, we used an address book application to demonstrate the if, for, and while statements. We're bringing it back to review the concepts we've learned so far.
name = " "
while (name != ""):
name = raw_input("Enter in the name: ")
if (name == ""):
continue
elif (name == "quit"):
break
phone_number = raw_input("Enter in the phone number: ")
address_line1 = raw_input("Enter address line one: ")
if (address_line1 == ""):
continue
address_line2 = raw_input("Enter address line two: ")
address_line3 = raw_input("Enter address line three: ")
#do something useful with the addresses
else:
print("send the email to Rick")
#emailAddresses("rick_m_hightower@emailcompany.com")
The first ...
Read now
Unlock full access