Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Assignment & Discussion Super Bowl, anyone? Let's help our friends at Python Sports Polling conduct a poll to determine the favored team in Super Bowl
Assignment & Discussion Super Bowl, anyone? Let's help our friends at Python Sports Polling conduct a poll to determine the favored team in Super Bowl LIV. Your mission in this programming assignment is to simulate a Python Sports Super Bowl poll. Write a Python program that prompts a user for their name and who they want to win; San Francisco 49ers or Kansas City Chiefs. Allow the poll to continue for as long as there are folks who want to take the poll. Does that sound like indefinite iteration to you? Tasks: 1. Implement your program in Python 3 in a file named py_sports.py. 2. Create an empty dictionary named responses. 3. Welcome the user to Python Sports Polling and the Super Bowl 2020 poll. 4. Implement a while loop to take in a user's name and desired victor for as long as there are user inputs. Prompt the user to input 'yes' to continue or 'no' to quit. Specifically: o Prompt for the user's name. Receive the name into the program and save it as the value of a name variable. O Prompt the user for their desired Super Bowl victor. Receive the response and save it as the value of a response variable. o Send the name and response to your responses dictionary as a key-value pair. 5. Once all inputs are in the program, print each poll participant's name and desired Super Bowl winner. How about a for loop to run through all the key-value pairs in the dictionary? Pay attention to your output. Make it look good. 6. Print the dictionary to show the key-value pairs. 7. Note: I'll test your program with 3-5 key-value pairs. valued
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