PythonEasyAlgorithms

FizzBuzz

Write a function that prints numbers 1 to n. For multiples of 3, print 'Fizz' instead. For multiples of 5, print 'Buzz'. For multiples of both, print 'FizzBuzz'.

Starter code

Python
def fizzbuzz(n):
    # Your code here
    pass

fizzbuzz(15)

Stuck on this challenge?

Let CodeForge AI help you find the solution.