23 lines
620 B
Python
23 lines
620 B
Python
# Excercise 7-10 Dream Vacation
|
|
# Learning Objective: Fill a dictionary with user input and list dictionary using while loops.
|
|
|
|
vacation_log = {}
|
|
|
|
polling_active = True
|
|
|
|
while polling_active:
|
|
name = input("Welcome!\nWhat is your name?\n\t")
|
|
|
|
location = input("Where is your dream vacation spot?\n\t")
|
|
|
|
vacation_log[name] = location
|
|
|
|
repeat = input("Is there another person ready to take the poll?")
|
|
|
|
if repeat == "no":
|
|
polling_active = False
|
|
print("\n <<<--- RESULTS: --->>>")
|
|
for name, location in vacation_log.items():
|
|
print(f"{name} wants to visit {location} on their dream vacay.")
|
|
|