Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- #
- def count(marks,scores):
- amt=0
- for score in scores:
- if score==marks:
- amt=amt+1
- return amt
- #
- 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))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement