Skip to content
Snippets Groups Projects
Commit 8c905a35 authored by Garcia Prieto, Fernando's avatar Garcia Prieto, Fernando
Browse files

actualizado codigo

parent ae209247
No related branches found
No related tags found
No related merge requests found
Pipeline #30234 passed
...@@ -5,5 +5,15 @@ def fizzbuzz(n:int) -> str: ...@@ -5,5 +5,15 @@ def fizzbuzz(n:int) -> str:
And for the multiples of five print "Buzz". And for the multiples of five print "Buzz".
For numbers which are multiples of both three and five print "FizzBuzz". For numbers which are multiples of both three and five print "FizzBuzz".
""" """
return "" return_value = ""
if n%3 == 0:
return_value += "Fizz"
if n%5 == 0:
return_value += "Buzz"
if len(return_value) == 0:
return_value = str(n)
return return_value
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment