I have a question:
When i wrote code to this exercise directly as You (Mosh) in VSCode, when i put 0 it show me “Fizz” as the result.
I fixed this issue to modified code like this:
def fizz_buzz(input):
if input == 0:
return input
if (input % 3 == 0) and (input % 5 == 0):
return "FizzBuzz"
if input % 3 == 0:
return "Fizz"
if input % 5 == 0:
return "Buzz"
return input
print(fizz_buzz(0))
Is this correct solution ?