Botontam

count_list_function2

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