Computers and Technology

You have collected a file of movie ratings where each movie is rated from 1 (bad) to 5 (excellent). The first line of the file is a number that identifies how many ratings are in the file. Each rating then consists of two lines: the name of the movie followed by the numeric rating from 1 to 5. Here is a sample rating file with four unique movies and seven ratings: 7
Harry Potter and the Order of the Phoenix
4
Harry Potter and the Order of the Phoenix
5
The Bourne Ultimatum
3
Harry Potter and the Order of the Phoenix
4
The Bourne Ultimatum
4
Wall-E
4
Glitter
1

Write a program that reads a file in this format, calculates the average rating for each movie, and outputs the average along with the number of reviews. Here is the desired output for the sample data:
Glitter: 1 review. Average of 1 / 5
Harry Potter and the Order of the Phoenix: 3 reviews, average of 4.3 / 5
The Bourne Ultimatum: 2 review, average of 3.5 / 5
Wall-E: 1 review. Average of 4 / 5

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 16:00, kebo63
Page orientation can be either landscape or
Answers: 1
image
Computers and Technology, 22.06.2019 17:00, ruddymorales1123
What allows you to create a wireless connection among your smart devices
Answers: 2
image
Computers and Technology, 22.06.2019 18:00, Geo777
Suppose an astronomer discovers a large, spherical-shaped body orbiting the sun. the body is composed mostly of rock, and there are no other bodies sharing its orbit. what is the best way to categorize this body? a. planet b. moon c. comet d. asteroid
Answers: 1
image
Computers and Technology, 24.06.2019 03:00, SiegeHatake4534
Will do anything for brainlest so can you guys me out i will try my best to you out
Answers: 1
Do you know the correct answer?
You have collected a file of movie ratings where each movie is rated from 1 (bad) to 5 (excellent)....

Questions in other subjects:

Konu
Mathematics, 11.03.2020 18:31
Konu
Social Studies, 11.03.2020 18:31