Answers for "how to randomly generate a numbers in python"

10

how to generate a random number python

import random
n = random.randint(0,22)
print(n)
Posted by: Guest on June-03-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

Code answers related to "how to randomly generate a numbers in python"

Python Answers by Framework

Browse Popular Code Answers by Language