Question
write a python program to apply this: Write a program that simulates a poll for voting for contestants of America's Got Talent: the program should
write a python program to apply this:
Write a program that simulates a poll for voting for contestants of America's Got Talent: the program should repeatedly prompt the user for a contestant name (each entry is a vote: you can pretend that each time the program prompts the user, it's a different voter). Optionally, you can determine the most popular performers and select the top 5 contestents to go head to head in America's Got Talent Ultimate Challenge Contest. Use the following steps to tally the votes and select the contestants.
Initialize a dictionary with the keys "Darci Lynne", "Angelica Hale", and "Angelina Green" with each having the value 0.
Repeatedly prompt the user for a contestant name to vote for, adding/updating the relevant key/value pair in the dictionary to tally the votes for each contestant. Stop prompting when the user enters "done".
After all the votes have been entered, print out all the contestants and their corresponding vote tallies.
Optional challenge: Compute the 5 most popular contestants and wish them congratulations by name. "Congratulations, Darci Lynne!". Do this after you have the rest of the program working and have tested your code.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started