Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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
Source by machinelearningmastery.com #
 
PREVIOUS NEXT
Tagged: #random #number #python
ADD COMMENT
Topic
Name
5+3 =