How to randomly choose 1 integer between the min and max | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How to randomly choose 1 integer between the min and max

import random def getRandomNumber(): for i in range(100): x = range.randrange(1,100) print(i) getRandomNumber()

14th May 2020, 1:07 PM
SWL
1 Answer
+ 5
random.randint(1,100)
14th May 2020, 1:21 PM
Abhay
Abhay - avatar