Advertisement
HJ50

build_performance_list snippet

Apr 5th, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.42 KB | None | 0 0
  1. # We need to build a list (called performance) 1st element will be how many 0's in score
  2. # 2nd element will be how many 1's and so on
  3. for i in range(11): #i will run from 0 to 10 (these are the valid score values)
  4.     #use count_items function to see how many matching scores we have
  5.     this_score_tally=count_items(i, scores)  #1st time round loop, i will be 0, next time 1 etc
  6.     performance.append(this_score_tally)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement