Answers for "get random number inpython"

84

random number python

# generate random integer values
from random import randint

value = randint(0, 10)
print(value)
Posted by: Guest on February-15-2020
0

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
Posted by: Guest on March-09-2021

Python Answers by Framework

Browse Popular Code Answers by Language