Saturday, 2 March 2019

Generate a Random Number in Python

# Program to generate a random number between 0 and 9
# import the random module
import random
print(random.randint(0,9))

Output:

5

1 comment:

Popular Posts

Categories

Android (21) AngularJS (1) Assembly Language (2) Books (10) C (75) C# (4) C++ (81) Data Strucures (4) Downloads (1) Engineering (13) FPL (17) Hadoop (1) HTML&CSS (38) IS (25) Java (87) Leet Code (4) PHP (20) Python (214) R (69) Selenium Webdriver (2) Software (14) SQL (27)