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