Question: In a file named benfordturtle.py, you will write a Python program that will read in a filename from the user. The file will contain one
In a file named benfordturtle.py, you will write a Python program that will read in a filename from the user. The file will contain one number on each line. Your program will compute the frequency (as a percentage of the whole) of the first digit of each number. Then it will use the turtle module to draw a horizontal bar chart. Important note: the Turtle Bar Chart (Links to an external site.)Links to an external site. link on our Canvas main page shows a vertical bar chart rather than the required horizontal one. Also note, you are not required to define your own functions.
In terms of bar chart style, you may use bars like those shown in the Turtle Bar Chartlink, or use a bar that is drawn using a single thick line. See examples below. Note: The colors are up to you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
