Skip to content

Commit

Permalink
Merge pull request #44 from cartrotech/main
Browse files Browse the repository at this point in the history
Crear cartrotech.py
  • Loading branch information
mouredev authored Jan 2, 2023
2 parents fc31fc2 + 7f29cab commit aca09e9
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [Fácil]/python/cartrotech.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# fizz buzz

for i in range(100):

result = ''
if (i+1)%3 == 0 and (i+1)%5 == 0:
result = 'fizzbuzz'

elif (i+1)%3 == 0:
result = 'fizz'

elif (i+1)%5 == 0:
result = 'buzz'

else:
result = str(i+1)

print(result)

0 comments on commit aca09e9

Please sign in to comment.