Advertisement
Txemin

Untitled

May 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. import random
  2.  
  3. def high_scores(max):
  4. ten= 0
  5. for score in scores:
  6. if score == max:
  7. ten=ten+1
  8. return ten
  9.  
  10. scores = []
  11.  
  12. for x in range (0, 30):
  13. scores.append(random.randint(0, 10))
  14.  
  15. print(scores)
  16.  
  17. # high_scores (10)
  18.  
  19. print("{} learners got top marks".format(high_scores(10)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement