Python program to generate a random number

This is a python program to random number. tested on python version 3.x




1
2
3
4
5
6
# python program to generate a random number
# between 0 and 9
# import the random module

import random
print(random.randint(0,9))

Output:

7

Comments