From 0e98e91f3dbc361055818d5c9fc0223c176d4295 Mon Sep 17 00:00:00 2001 From: cheeks <134818917+leftovertoast@users.noreply.github.com> Date: Mon, 10 Feb 2025 21:09:11 -0500 Subject: [PATCH] Completed Exercise 7-10 Dream Vacation --- Chapter_07/7-10_dream_vacation.py | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Chapter_07/7-10_dream_vacation.py diff --git a/Chapter_07/7-10_dream_vacation.py b/Chapter_07/7-10_dream_vacation.py new file mode 100644 index 0000000..b2235fe --- /dev/null +++ b/Chapter_07/7-10_dream_vacation.py @@ -0,0 +1,22 @@ +# 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.") +