2019-08-19 13:37:49 +00:00
|
|
|
def atbash():
|
2019-05-26 16:40:04 +00:00
|
|
|
output=""
|
2019-08-19 13:37:49 +00:00
|
|
|
for i in input("Enter the sentence to be encrypted ").strip():
|
2019-06-05 01:09:04 +00:00
|
|
|
extract = ord(i)
|
|
|
|
if 65 <= extract <= 90:
|
2019-08-19 13:37:49 +00:00
|
|
|
output += chr(155-extract)
|
2019-06-05 01:09:04 +00:00
|
|
|
elif 97 <= extract <= 122:
|
2019-08-19 13:37:49 +00:00
|
|
|
output += chr(219-extract)
|
2019-05-26 16:40:04 +00:00
|
|
|
else:
|
2019-08-19 13:37:49 +00:00
|
|
|
output += i
|
2019-06-05 01:09:04 +00:00
|
|
|
print(output)
|
2019-05-26 16:40:04 +00:00
|
|
|
|
2019-07-08 15:27:51 +00:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2019-08-19 13:37:49 +00:00
|
|
|
atbash()
|