DEV Community

Cover image for Modules (Random)  PYTHON3
francnstein
francnstein

Posted on

Modules (Random) PYTHON3

Modules are pieces of code that other people have written to fulfill common tasks, such as generating random numbers, performing mathematical operations, etc.

random selects random numbers in this case 1-20

import random
for i in range(20):
value = random.randint(1,20)
print(value)

Top comments (0)