I'm trying to make an algorithm, which counts how many numbers are divided without a remainder.
d=[]
for i in range (0, 10001):
for c in range (1, 16):
if i % c == 0: d[c] += 1
I expect to have something like this
/1: 10000
/2: 5000
/3: 3334
/4: 2500
/5: 2000
/6: 1667
/7: 1429
/8: 1250
/9: 1112
/10: 1000
/11: 910
/12: 834
/13: 770
/14: 715
/15: 667
, but i get IndexError: list index out of range