Print Numbers 1–100

Use a loop to print numbers from 1 to 100.

PythonBeginner
Python
# Program to print numbers from 1 to 100

for i in range(1, 101):
    print(i)

Output

1
2
3
...
100

We use a simple for loop with range(1, 101) to generate integers 1 through 100 (upper bound is exclusive).