Skip to content

Commit aa86427

Browse files
1
1 parent 293871d commit aa86427

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

1.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
s1 = "g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj."
2+
3+
s2 = "map"
4+
5+
def maketrans(s):
6+
s2 = ""
7+
for i in range(len(s)):
8+
c = s[i]
9+
if not c.isalnum():
10+
o = ord(c)
11+
elif c == 'y' or c == 'z':
12+
o = ord(c) - 26 + 2
13+
else :
14+
o = ord(c) + 2
15+
c2 = chr(o)
16+
s2 += c2
17+
return s2
18+
19+
print(maketrans(s1))
20+
print(maketrans(s2))
21+
22+
s2.maketrans()

0 commit comments

Comments
 (0)