Skip to content
Snippets Groups Projects
Commit b69b871b authored by Perez Domingo, Victor's avatar Perez Domingo, Victor
Browse files

Merge branch 'master' into 'master'

Master

See merge request !3
parents a13dfb2c 8a0c7f71
No related branches found
No related tags found
1 merge request!3Master
Pipeline #30237 passed
image: "python:3.7"
before_script:
- pip install -r requirements.txt
test:
script:
- pytest
tags:
- docker
def fizzbuzz(n:int) -> str:
def fizzbuzz(i:int) -> str:
"""
Write a program that prints the numbers from 1 to 100.
But for multiples of three print "Fizz" instead of the number
And for the multiples of five print "Buzz".
For numbers which are multiples of both three and five print "FizzBuzz".
"""
return ""
if i % 3 == 0 and i % 5 == 0:
s ="FizzBuzz"
elif i % 3 == 0:
s = "Fizz"
elif i % 5 == 0:
s ="Buzz"
else:
s = str(i)
return s
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment