Skip to content
Snippets Groups Projects
Commit 6683b9b9 authored by Boto Sanchez, Fernando's avatar Boto Sanchez, Fernando
Browse files

mod

parent 1d686072
No related branches found
No related tags found
No related merge requests found
Pipeline #30229 failed
......@@ -5,13 +5,13 @@ 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".
"""
for i in range(1,101):
if i%3==0 and not i%5==0:
print ("Fizz")
if i%5 and not i%3==0:
print ("Buzz")
if i%3==0 and i%5==0:
print ("FizzBuzz")
return ""
if n%3==0:
return ("Fizz")
if n%5==0:
return ("Buzz")
if n%3==0 and i%5==0:
return ("FizzBuzz")
return str(n)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment