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