Advertisement
kealeydodds

Untitled

Sep 15th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #This program counts the number of learners who scored 0 to 10 marks
  2.  
  3. import random
  4. import matplotlib.pyplot as plot
  5.  
  6. def count(x, lst):
  7. count = 0
  8. for num in range(len(lst)):
  9. if lst[num] == x:
  10. count += 1
  11. return count
  12.  
  13. scores = []
  14. chart = []
  15.  
  16. for x in range (0, 30):
  17. scores.append(random.randint(0, 10))
  18.  
  19. print (scores)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement