PRACTICE

Loops

Lesson notes

Your task

Print the multiples of 3 from 1 through 10, each on its own line.

Expected output
3
6
9
Loading…

OUTPUT

Worked solution
for n in range(1, 11):
    if n % 3 == 0:
        print(n)

Checks compare printed output, not your approach. Several solutions can be valid.

← Back to courses