Python Program to Generate Random Number

0
246

In this Python Program, we will be creating a Python Program to Generate Random Numbers between 0 to 9.

Python Program to Generate Random Number

We should import module random. Modules are basically recorded with the “. py” expansion containing Python code that can be imported inside another Python Program. after that print the random number using the Print function

Python Program to Generate Random Number [Source Code]

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

Output

6

if you have any doubt feel free to ask me on social media

Also, Read

LEAVE A REPLY

Please enter your comment!
Please enter your name here