Q. Write a Python program to generate a random number between 0 and 9.


Answer :-
import random as r
print ("A random number generated between 0 and 9 :- ", r.randint(0,9))
Output :-

A random number generated between 0 and 9 :-  0
>>>
A random number generated between 0 and 9 :-  2
>>>

Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post