From 564bfbeddfca3f89c3550dcd240a6454b89d90b6 Mon Sep 17 00:00:00 2001 From: Miguel Millones Date: Sat, 10 Jun 2023 02:31:47 -0500 Subject: [PATCH] Reto #0 python --- .../python/miguelmillones.py" | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/miguelmillones.py" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/miguelmillones.py" index 31e548be8e..2d7332d2de 100644 --- "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/miguelmillones.py" +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/miguelmillones.py" @@ -9,8 +9,21 @@ # * - MĂșltiplos de 3 y de 5 a la vez por la palabra "fizzbuzz". # */ -numero_inicial=0 -numero_final=100 +#Rango: +NUMERO_INICIAL=1 +NUMERO_FINAL=100 -lista=range(numero_inicial,numero_final,1) -print(lista) +for i in range(NUMERO_INICIAL, NUMERO_FINAL+1,1): + MUL3=i%3 + MUL5=i%5 + + if MUL3==0: + if MUL5==0: + print("fizzbuzz") + else: + print("fizz") + else: + if MUL5==0: + print("buzz") + else: + print(i) \ No newline at end of file