Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- #
- # Add your count function here
- #
- def count(value, data):
- total = 0
- for item in data:
- if item==value:
- total += 1
- return total
- scores = []
- for x in range (0, 30):
- scores.append(random.randint(0, 10))
- print(scores)
- top_scorers = count(10, scores) # Count function called here
- print("{0} learners got top marks".format(top_scorers))
Add Comment
Please, Sign In to add comment