CodeNewbie Community

loading...

Discussion on: How can I generate random numbers in Python?

Collapse
yechielk profile image
Yechiel (he/him)
from random import randint

random_number = randint(1, 100)
Enter fullscreen mode Exit fullscreen mode

Will give you a number between 1 and 100

Collapse
richardb profile image
Richard B Author

thanks Yechiel 😀