Skip to content

Instantly share code, notes, and snippets.

@magusafr
Created June 29, 2018 15:20
Show Gist options
  • Save magusafr/b0dc80318a1e10ad6f7c7e35d664587a to your computer and use it in GitHub Desktop.
Save magusafr/b0dc80318a1e10ad6f7c7e35d664587a to your computer and use it in GitHub Desktop.
Polling
responses = {}
polling_active = True
while polling_active:
name = input("\nWhat is your name? ").upper()
response = input("Which mountain would you like to climbomeday? ").upper()
responses[name] = response
repeat = input("Would you like to let another person respond? (yes/no) ").lower()
if repeat == "no":
polling_active = False
print("\n--- Poll Results ---")
for name, response in responses.items():
print(name + " would like to climb " + response + ".")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment