From f5d7377db9f4206dbc421bce7aa3a778f6b84908 Mon Sep 17 00:00:00 2001 From: PatriciaOM <142254044+PatriciaOM@users.noreply.github.com> Date: Fri, 26 Jul 2024 11:10:47 +0200 Subject: [PATCH 1/3] Add files via upload --- .../PatOliv.py" | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" new file mode 100644 index 0000000000..101b99171a --- /dev/null +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" @@ -0,0 +1,20 @@ +""" +Escribe un programa que muestre por consola (con un print) los +números de 1 a 100 (ambos incluidos y con un salto de línea entre +cada impresión), sustituyendo los siguientes: +Múltiplos de 3 por la palabra "fizz". +Múltiplos de 5 por la palabra "buzz". +Múltiplos de 3 y de 5 a la vez por la palabra "fizzbuzz". +""" +def reto_1(): + for number in range (1, 101): + if number%3 == 0 and number%5 == 0: + print("fizzbuzz") + elif number%3 == 0: + print("fizz") + elif number%5 == 0: + print("buzz") + else: + print(number) + +reto_1() \ No newline at end of file From 693d6bf23e324dae0ab93841524843cf13994396 Mon Sep 17 00:00:00 2001 From: PatriciaOM <142254044+PatriciaOM@users.noreply.github.com> Date: Fri, 26 Jul 2024 12:03:15 +0200 Subject: [PATCH 2/3] Add files via upload --- .../python/PatriciaOM.py" | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 "Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/python/PatriciaOM.py" diff --git "a/Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/python/PatriciaOM.py" "b/Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/python/PatriciaOM.py" new file mode 100644 index 0000000000..884c7be27b --- /dev/null +++ "b/Retos/Reto #1 - EL LENGUAJE HACKER [F\303\241cil]/python/PatriciaOM.py" @@ -0,0 +1,28 @@ +""" +Escribe un programa que reciba un texto y transforme lenguaje natural a +"lenguaje hacker" (conocido realmente como "leet" o "1337"). Este lenguaje +se caracteriza por sustituir caracteres alfanuméricos. +- Utiliza esta tabla (https://www.gamehouse.com/blog/leet-speak-cheat-sheet) +con el alfabeto y los números en "leet". +(Usa la primera opción de cada transformación. Por ejemplo "4" para la "a") +""" + +def lenguaje_hacker(text): + new_text = "" + list_indexes = [] + alphabet_numbers = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m" + ,"n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" + ,"1", "2", "3", "4", "5", "6", "7", "8", "9", "0", " ", ".", ","] + leet_alphabet_numbers = ["4", "I3", "[", ")", "3", "|=", "&", "#", "1", ",_|", ">|", "1", + "/\/\\", "^/", "0", "|*", "(_,)", "I2", "5", "7", "(_)", "\/", + "\/\/", "><", "j", "2", "L", "R", "E", "A", "S", "b", "T", "B", + "g", "o", " ",".", ","] + for letter in text: + for character in alphabet_numbers: + if letter.lower() == character: + list_indexes.append(alphabet_numbers.index(character)) + for index in list_indexes: + new_text = new_text + leet_alphabet_numbers[index] + print(new_text) + +lenguaje_hacker("Hola, me llamo Patricia.") \ No newline at end of file From ed864bf98904556f0572c93b5a85ac0584c17b66 Mon Sep 17 00:00:00 2001 From: Bruce <88008233+Roswell468@users.noreply.github.com> Date: Fri, 26 Jul 2024 20:52:42 -0300 Subject: [PATCH 3/3] =?UTF-8?q?Correcci=C3=B3n=20carpeta=20y=20nombre=20de?= =?UTF-8?q?=20fichero?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Atención a las reglas 😉 --- .../python/PatriciaOM.py" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" => "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/PatriciaOM.py" (95%) diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/PatriciaOM.py" similarity index 95% rename from "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" rename to "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/PatriciaOM.py" index 101b99171a..799d647f8d 100644 --- "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/PatOliv.py" +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/python/PatriciaOM.py" @@ -17,4 +17,4 @@ def reto_1(): else: print(number) -reto_1() \ No newline at end of file +reto_1()