We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60c14e5 commit a7b34a4Copy full SHA for a7b34a4
1 file changed
CaesarsCypherEncryptor.py
@@ -1,19 +1,22 @@
1
+import time
2
+
3
def encypt_func(txt, s):
4
result = ""
-
5
for i in range(len(txt)):
6
char = txt[i]
7
if (char.isupper()):
8
result += chr((ord(char) + s - 64) % 26 + 65)
9
else:
10
result += chr((ord(char) + s - 96) % 26 + 97)
11
- return result
12
13
-#Enter here
14
-txt = "Created by Random Demon"
+ return result
+txt = input("What would you like to encrypt?")
15
s = 4
16
+time.sleep(1)
17
print("Plain txt : " + txt)
18
19
print("Shift pattern : " + str(s))
-print("Cipher: " + encypt_func(txt, s))
20
21
+print("Cipher: " + encypt_func(txt, s))
22
+time.sleep(3)
0 commit comments