Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- #
- # Add your count function here
- #
- scores = []
- for x in range (0, 30):
- scores.append(random.randint(0, 10))
- print(scores)
- def count(score, scores):
- S= 0
- for i in scores:
- if i == score:
- S += 1
- return S
- num = int(input ('What score do you want to check?'))
- top_scorers = count(num, scores) # Count function called here
- print("{0} learners got that score".format(top_scorers))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement