I am currently following along with an intro to Python course. In the course we just wrote the following code.
def fizz_buzz(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(7))
I understand what is happening in the program but I do not understand why it was necessary to set divisor == 0.