Tom_Jung

Untitled

Jan 29th, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. from random import randint
  2. from collections import Counter
  3.  
  4. scores = []
  5. tens = 0
  6.  
  7. for x in range (0,30):
  8. scores.append(randint(0, 10))
  9.  
  10. for score in scores:
  11. if score == 10:
  12. tens = tens + 1
  13.  
  14. print("Scores = ", scores)
  15. print("Leaners with Tens = ", tens)
  16. print("{0} learners got top marks".format(tens))
  17. print("List & number of scores = ", Counter(scores))
Advertisement
Add Comment
Please, Sign In to add comment