-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathl33t.py
51 lines (46 loc) · 1.12 KB
/
l33t.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
'''
* 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")
'''
leet_dir = {
'a': '4',
'b': 'I3',
'c': '[',
'd': ')',
'e': '3',
'f': '|=',
'g': '&',
'h': '#',
'i': '1',
'j': ',_|',
'k': '>|',
'l': '£',
'm': '|\/|',
'n': '^/',
'o': '0',
'p': '|*',
'q': '(_,)',
'r': 'I2',
's': '5',
't': '7',
'u': '(_)',
'v': '\/',
'w': '\/\/',
'x': '><',
'y': 'j',
'z': '2',
}
def lenguaje_hacker():
text = input('Please, input your Text to convert to l33t code:\n>').lower()
leet_text = ''
for letter in text:
if letter in leet_dir:
leet_text += leet_dir[letter]
else:
leet_text += letter
return print(leet_text)
lenguaje_hacker()