-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKama-sutra-0.1.py
More file actions
42 lines (35 loc) · 834 Bytes
/
Kama-sutra-0.1.py
File metadata and controls
42 lines (35 loc) · 834 Bytes
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
#!/usr/bin/python3.4
import signal
a = "abcdefghijklm"
b = "nopqrstuvxwyz"
c = list (input("Digite aqui o seu texto limpo: "))
#converte a string em lista para melhor funcionalidade no IF
alfaA = "àáãäâ"
alfaE = "èéẽëê"
alfaI = "ìíĩïî"
alfaO = "òóõöô"
alfaU = "ùúũüû"
for x in range(0, len(c)):
#debug para alguns caracteres especiais
if c[x] == 'ç':
c[x] = 'c'
for z in range(0, len(alfaA)):
if c[x] == alfaA[z]:
c[x] = 'a'
elif c[x] == alfaE[z]:
c[x] = 'e'
elif c[x] == alfaI[z]:
c[x] = 'i'
elif c[x] == alfaO[z]:
c[x] = 'o'
elif c[x] == alfaU[z]:
c[x] = 'u'
#fim do debug
for y in range(0, 12):
if c[x] == a[y]:
c[x] = b[y]
else:
if c[x] == b[y]:
c[x] = a[y]
c = "".join(c) #converte a lista em string novamente
print("Seu texto cifrado eh: " + c)