LearnPath

python · beginner · ~15 min

FizzBuzz

Write `fizzbuzz(n)` that returns a list of strings for 1..n. Multiples of 3 become 'Fizz', of 5 'Buzz', of both 'FizzBuzz', otherwise the number as a string.

python editor · loading…

Output

Run to see output.