From 5be32f4022135a10585cf094b6fb8118dd87a2f6 Mon Sep 17 00:00:00 2001 From: Shubhayu Das <43082352+sateslayer@users.noreply.github.com> Date: Sun, 26 May 2019 22:10:04 +0530 Subject: [PATCH] Add files via upload (#396) --- ciphers/Atbash.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 ciphers/Atbash.py diff --git a/ciphers/Atbash.py b/ciphers/Atbash.py new file mode 100644 index 000000000..67bd69425 --- /dev/null +++ b/ciphers/Atbash.py @@ -0,0 +1,14 @@ +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 + print output + +Atbash() ; \ No newline at end of file