Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import random
- def count(tgt, sc_list):
- counter = 0
- i = 0
- for item in sc_list:
- if sc_list[i] == tgt:
- counter += 1
- i += 1
- return counter
- scores = []
- for x in range (0, 30):
- scores.append(random.randint(0, 10))
- print(scores)
- top_scorers = count(10, scores)
- print("{0} scores were topscores".format(top_scorers))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement