From 7f29cab8fb5ef23a546dbadf912aeb65c4fe6333 Mon Sep 17 00:00:00 2001 From: qserrano Date: Tue, 27 Dec 2022 17:00:23 +0100 Subject: [PATCH] Crear cartrotech.py --- .../python/cartrotech.py" | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/cartrotech.py" diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/cartrotech.py" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/cartrotech.py" new file mode 100644 index 0000000000..45d7d6978a --- /dev/null +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/cartrotech.py" @@ -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) +