Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genomes And Databases On The Internet A Practical Guide To Functions And Applications

Authors: Paul Rangel

1st Edition

189848631X, 978-1898486312

More Books

Students also viewed these Databases questions

Question

7. Discuss the key features of the learning organization.

Answered: 1 week ago