Xabi 2

parent 2136bb2f
Pipeline #30221 passed with stage
in 18 seconds
......@@ -5,13 +5,12 @@ def fizzbuzz(n:int) -> str:
And for the multiples of five print "Buzz".
For numbers which are multiples of both three and five print "FizzBuzz".
"""
if 3 % n == 0 and 5 % n == 0:
if n % 3 == 0 and n % 5 == 0:
return "FizzBuzz"
elif 3 % n == 0:
elif n % 3 == 0:
return "Fizz"
elif 5 % n ==0:
elif n % 5 == 0:
return "Buzz"
else:
return str(n)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment