Question: Write a program to draw a quiz score histogram. (Refer to exercise 16 of Chapter 5.) Your program should read data from a file, where

Write a program to draw a quiz score histogram. (Refer to exercise 16 of Chapter 5.) Your program should read data from a file, where each line of the file contains one number in the range 0 to 10. Your program must count the number of occurrences of each score and then draw a vertical bar chart for each possible score (0 to 10) with a height corresponding to the count of the number of lines with that score. For example, if 15 lines contained an 8, then the height of the bar for 8 should be 15. Hint: use a list that stores the count for each possible score. Could you write it in Python 3.x please?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!