Sharpen your Python skills with beginner-friendly for loop exercises. Practice iteration, range, nested loops, and real coding tasks to master Python loops step-by-step.
Topic: loops-for
Write a `for` loop to print the word "Python" five times.
Python
Python
Python
Python
Python
Write a `for` loop to print numbers from 0 to 9.
0 1 2 3 4 5 6 7 8 9
Write a `for` loop to print all even numbers from 2 to 20.
2 4 6 8 10 12 14 16 18 20
Write a `for` loop to iterate through the string "Hello, World!" and print each character.
H
e
l
l
o
,
W
o
r
l
d
!
Write a `for` loop to calculate the factorial of a given number, e.g., 5! = 5 × 4 × 3 × 2 × 1.
5
120
Write a Python for loop that prints the square of each number from 1 to 5.
1 4 9 16 25
Use a `for` loop to print numbers from 10 down to 1.
10 9 8 7 6 5 4 3 2 1
Calculate the sum of the first N natural numbers using a for loop.
5
15
Tutorials, Roadmaps, Bootcamps & Visualization Projects