bryan12376
bryan12376
01.11.2019 • 
Engineering

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.

Solved
Show answers

Ask an AI advisor a question