Answered step by step
Verified Expert Solution
Question
1 Approved Answer
python First, create a dictionary, initially empty. (An empty dictionary is just a pair of Is with nothing in it.) Using a while loop, repeatedly
python
First, create a dictionary, initially empty. (An empty dictionary is just a pair of Is with nothing in it.) Using a while loop, repeatedly prompt the user to enter movie titles, until they enter "done". Each time through the loop: . After they enter each movie title, ask them to enter a number of "stars" (1 through 5) to rate that movie. Store an entry in the dictionary with the title as the key and the rating as the value After input is done, print a report showing all titles along with the corresponding rating, one on each line. For example: The Matrix: 4 Titanic: 1 Frozen II: 5 Next, store the numbers alone into their own lists by doing this: variablename - dictionaryname.values() Using this list and techniques from class, report: The highest and lowest ratings The average rating Finally, print a frequency table for the ratings. For example: Rating Frequency 2 movies @ movies 4 movies 5 movies 2 movieStep 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