Skip to content

Commit

Permalink
Merge pull request #4381 from coolbender/main
Browse files Browse the repository at this point in the history
Reto #1 - Python
  • Loading branch information
kontroldev authored Jul 30, 2023
2 parents 0d9c842 + 29c8555 commit 589202e
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Retos/Reto #1 - EL LENGUAJE HACKER [Fácil]/python/coolbender.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
'''
/*
* 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")
*/
'''

leetDict={"a":"4", "e":"3", "i":"1", "o":"0", "u":"v"}

def thelleter():
text=input("Introduce un texto para transformar:")
for l in leetDict.keys():
text = text.replace(l, leetDict[l])

return text


print(thelleter())

0 comments on commit 589202e

Please sign in to comment.