Ask your own question, for FREE!
Computer Science 15 Online
OpenStudy (mew55):

can anybody help me? its creating a histogram of random numbers from 0 to 9

OpenStudy (anonymous):

Are you using pylab or matlab to make the histogram or are you simply outputting a list ? What programming language are you using if you are? ... Here is some code in python that creates a list of the number of times each number comes up. You can then plot this into a histogram graph or whatever else you are doing. >>> L = [0]*10 >>> L [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] >>> for i in range(101): L[random.randrange(10)] += 1 >>> L [11, 8, 11, 11, 7, 14, 11, 13, 11, 4]

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!