Question: Write a program to draw a quiz score histogram. Your program should read data from a file. Each line of the file contains a number

Write a program to draw a quiz score histogram. Your program should read data from a file. Each line of the file contains a number in the range 0-10. Your program must count the number of occurrences or each score and then draw a vertical bar chart with a bar for each possible score (0-10) with a height corresponding to the count of that score. For example, if 15 students got 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.
scores.txt
0
1
2
2
4
4
4
5
5
5
5
6
6
6
6
6
7
7
7
7
7
7
7
8
8
8
9
9
9
10
10
 Write a program to draw a quiz score histogram. Your program

0 1 2 3 4 5 6 78 9 10 0 1 2 3 4 5 6 78 9 10

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!