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‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
defAtbash():
2+
inp=raw_input("Enter the sentence to be encrypted ")
3+
output=""
4+
foriininp:
5+
extract=ord(i)
6+
ifextract>=65andextract<=90:
7+
output+=(unichr(155-extract))
8+
elifextract>=97andextract<=122:
9+
output+=(unichr(219-extract))
10+
else:
11+
output+=i
12+
printoutput
13+
14+
Atbash() ;

0 commit comments

Comments
(0)