-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4381 from coolbender/main
Reto #1 - Python
- Loading branch information
Showing
1 changed file
with
22 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
Retos/Reto #1 - EL LENGUAJE HACKER [Fácil]/python/coolbender.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) |