root@coding-prodigies:~#
← All challenges

FizzBuzz

The classic. Print numbers 1-15, but with a twist on multiples of 3 and 5.

🟢 EasyDifficulty

The challenge

Print the numbers from 1 to 15, one per line -- except:

Output

  
🧠 Need a hint? (Python)

The modulo operator (%) tells you if a number divides evenly. Check i % 15 == 0 before checking i % 3 or i % 5 alone, or the FizzBuzz case will never be reached.

🚀

Like solving these?

Structured courses, hands-on exercises, and real multi-file projects are waiting -- your first project unlock is free.

Create a free account

More challenges