# Fill in the blanks in the code below. from graphics import * def main(): # read scores from file, 0 through 9 # produce a bar chart which has a # bar for each number 0-9, which is as tall as # the number of that score seen in the file # must have a list of 10 counters, one for each score counts = [_counts___] * 10 # counters for each score inf = open("scores.txt", ________ ) # for reading for line in inf: # assumed one number per line score = ___________________ (line) ____________________ # add one to appr
I'm confused on the counts part
counts[ 10 ] inf = open( "scores.txt", 'r' ) score = 1 while( score ): score = inf.readline() counts[ score ] += 1
Join our real-time social learning platform and learn together with your friends!