Ask your own question, for FREE!
Computer Science 7 Online
OpenStudy (anonymous):

# 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

OpenStudy (anonymous):

I'm confused on the counts part

OpenStudy (rsmith6559):

counts[ 10 ] inf = open( "scores.txt", 'r' ) score = 1 while( score ): score = inf.readline() counts[ score ] += 1

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!