Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 2 : Present Statistical Information Building upon the foundation of Problem 1 , extend the program to provide viewers with a further statistical breakdown

Problem 2: Present Statistical Information
Building upon the foundation of Problem 1, extend the program to provide viewers with a further statistical breakdown of their collective ratings. Write the body of the program called Problem2 that reads viewer ratings (the same as in Problem1) and compute and print out the total number of votes in each level of rating and its corresponding percentage value.
Input
The input format is the same as in Problem 1.
Processing
The program should count the total number of votes in each level of ratings, e.g., how many 5star votes. Furthermore, the percentage of votes in each corresponding rating level should be calculated by considering the number of votes in each level of ratings divided by the total number of votes.
Output
The program should print out five lines with vote count and percentage information for each rating level respectively. The output has the following format:
C11-star votes, P1
image text in transcribed

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

More Books

Students also viewed these Databases questions

Question

What are the implications of climate change for CSR?

Answered: 1 week ago