I wrote this code for my homework:
import random
score=[]
random.seed(1)
for i in range(0,100):
score.append(random.randrange(0,21))
for k in range(20, -1, -1):
print("Who get %2d score in test? : "%(k), end='')
while score.count(k)!=0:
j = score.index(k)
print("%3s" % (j), end=" ")
score.remove(k)
score.insert(j,25)
print("\n")
I ran it on my computer many times and the results were the same. Ironically, in other computers, the results are different from my computer, but also also getting repeated at each execution.
What's wrong with my code?