Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

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 movie

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 Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

Students also viewed these Databases questions

Question

Describe the concept of cash in advance.

Answered: 1 week ago