Light Mode
Dark Mode
Fizz-Buzz>>Assertion Error: "6 is divisible by 3"

Hi all! I cannot understand, why assertion error "6 is divisible by 3" is thrown on this code:

if not number % 3 and not number % 5:
    print("Fizz buzz")
elif not number % 3:
    print("Fizz")
elif not number % 5:
    print("Buzz")
else:
    return str(number) 
return 'Fizz Buzz'

Would be grateful for help and explanation!

Created: July 1, 2019, 5:12 p.m.
Updated: July 4, 2019, 10:07 p.m.
0
9
User avatar
BallV