Python Generate a Random Number

In this snippet, we will generate a random number.

Solution

The code:

import random

print(random.randint(0,50))

Output:

8

Run the program in our IDE.


Software Engineer | Ethical Hacker & Cybersecurity...

Md Obydullah is a software engineer and full stack developer specialist at Laravel, Django, Vue.js, Node.js, Android, Linux Server, and Ethichal Hacking.