Skip to content

Commit 5be32f4

Browse files
Shubhayu-DasAnupKumarPanwar
authored andcommitted
Add files via upload (TheAlgorithms#396)
1 parent 7f4f565 commit 5be32f4

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ciphers/Atbash.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def Atbash():
2+
inp=raw_input("Enter the sentence to be encrypted ")
3+
output=""
4+
for i in inp:
5+
extract=ord(i)
6+
if extract>=65 and extract<=90:
7+
output+=(unichr(155-extract))
8+
elif extract>=97 and extract<=122:
9+
output+=(unichr(219-extract))
10+
else:
11+
output+=i
12+
print output
13+
14+
Atbash() ;

0 commit comments

Comments
 (0)