how to generate random number in pyrhon code example
Example 1: random number python
# generate random integer values
from random import randint
value = randint(0, 10)
print(value)
Example 2: how to get a random number in python
def randnum(min, max):
num = random.randint(a, b)
return num
randomnumber = randnum(0,10)
print(randomnumber)
#output: 5