random.randint bug #146

Closed
MarkOfZero opened this Issue Feb 24, 2013 · 2 comments

Comments

Projects
None yet
3 participants

This code should generate random integer values between 1 and 10.

But, it only generates values between 1 and 9.

from numpy import *

while True:
print random.randint(1, 10)

I just tried this and got values from 1 to 10.

import random
[...]
random.randint(1,10)
2
random.randint(1,10)
9
random.randint(1,10)
10
random.randint(1,10)

Running WebIDE 3.3

Owner

ladyada commented Feb 25, 2013

the webide just compiles python code and runs it, for python help there are tons of websites & books available out there. thanks!

ladyada closed this Feb 25, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment