Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

*******Python********* Polling for America's Got Talent Winners Ultimate Challenge Contest Write a program that simulates a poll for voting for contestants of America's Got Talent:

*******Python*********

Polling for America's Got Talent Winners Ultimate Challenge Contest

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.

Example input:

Darci Lynne Celine Tam Darci Lynne Darci Lynne .... Bello Nock Angelina Green Celine Tam Done 

Output should look something like this:

Darci Lynne 34 Bello Nock 29 Oscar Hernadez 1 Celine Tam 25 Preacher Lawson 2 Brobots & Mandroidz 14 The Masqueraders 13 

If you implement the optional piece:

 Congratulations, Darci Lynne, you're in the Ultimate Challenge with 34 votes! Congratulations, Bello Nock, you're in the Ultimate Challenge with 29 votes! Congratulations, Celine Tam, you're in the Ultimate Challenge with 25 votes! Congratulations, Brobots & Mandroidz, you're in the Ultimate Challenge with 14 votes! Congratulations, The Masqueraders, you're in the Ultimate Challenge with 13 votes!

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

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions

Question

Describe the major methods of assessment

Answered: 1 week ago

Question

What types of nonverbal behavior have scholars identifi ed?

Answered: 1 week ago