Anyone good with python?

Associate
Joined
8 Oct 2006
Posts
1,236
I need to create a program which uses pythons built in random module, to generate 1000 numbers between 0 and 9 and then use a list to act as a set of counters to record how many times each different number between 0 and 9 appears.

The function in the random module is randint (a,b) where a and b are the limits, in this case, (0,9).

Anyone give me some advice on how this can be done?


cheers,

digi
 
here what i got so far, not much haha:

from random import *
list1 = [0] * 10

Def randomchecker():
for i in range(1000):
return randint(0,9)
print list1


please help!
 
Back
Top Bottom