DEV Community

Cover image for Modules (Random)  PYTHON3
francnstein
francnstein

Posted on

1 1

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)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay