def fizzbuzz(n):
2 ↛ 3line 2 didn't jump to line 3, because the condition on line 2 was never true if n % 15 == 0:
return "FizzBuzz"
if n % 3 == 0:
return "Fizz"
if n % 5 == 0:
return "Buzz"
return str(n)
assert fizzbuzz(3) == "Fizz"
assert fizzbuzz(4) == "4"
assert fizzbuzz(5) == "Buzz"
|