Python/ciphers/Atbash.py

15 lines
363 B
Python
Raw Normal View History

2019-05-26 16:40:04 +00:00
def Atbash():
inp=raw_input("Enter the sentence to be encrypted ")
output=""
for i in inp:
extract=ord(i)
if extract>=65 and extract<=90:
output+=(unichr(155-extract))
elif extract>=97 and extract<=122:
output+=(unichr(219-extract))
else:
output+=i
2019-05-26 17:29:07 +00:00
print (output)
2019-05-26 16:40:04 +00:00
2019-05-26 17:29:07 +00:00
Atbash() ;