OpenStudy (anonymous):

In Python, how can you choose a random number from a range of numbers (and assign its value to x)?

5 years ago
OpenStudy (anonymous):

you can import randint from random and use that to get a random number , you can use following code to get a random number between 0 and 10 . -- code -- from random import ran dint x=randint(0,10) --code--

5 years ago
OpenStudy (anonymous):

https://gist.github.com/4238607#file-roll_dice-py

5 years ago
Similar Questions: