generate random values in python programming

0

we can generate random numbers in python using random module:

import random

the following contributions are random module examples:

 

 

All Contributions

import random

number = random.randrange(0, 101, 10)
print(number)

import random

number = random.randrange(5, 10)
print(number)

import random

number=random.randint(1,100)
print(number)

total contributions (3)

New to examplegeek.com?

Join us