16 lines
369 B
Python
Raw Normal View History

def atbash():
2019-10-05 01:14:13 -04:00
output = ""
for i in input("Enter the sentence to be encrypted ").strip():
extract = ord(i)
if 65 <= extract <= 90:
2019-10-05 01:14:13 -04:00
output += chr(155 - extract)
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:
output += i
print(output)
2019-05-26 22:10:04 +05:30
2019-10-05 01:14:13 -04:00
if __name__ == "__main__":
atbash()