0
d=[]
import random
for n in range(100):
d.append(random.randint(1,10))
print(d)
for i in range(10):
print("The number of",str(i)+"'s","in the list is",d.count(i))
Your code is incorrect. You are using [1] instead of 1. It looks for lists rather than integers. The corrected code checks the integers. Because of the difference between the type of variables, it gives you a logical error. A logical error is unrelated to a computer saying that it has an error. It means it gives you the wrong output.