Answers for "What module do we use to get random numbers in Python?"

2

random numbers in python

import random

randomNumber = random.randint(1, 100)
print(randomNumber)
Posted by: Guest on December-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 "What module do we use to get random numbers in Python?"

Python Answers by Framework

Browse Popular Code Answers by Language