File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change 1- user_input = input ("\t Press enter to start encrypting messages using a modified Caesar's Cipher. Enter 'quit' to exit the program\n >>> " )
2-
3- while user_input .lower () != "quit" :
1+ def main () -> None :
2+ user_input = input ("\t Press enter to start encrypting messages using a modified Caesar's Cipher. Enter 'quit' to exit the program\n >>> " ).lower ()
3+
4+ if user_input == "quit" :
5+ return
6+
47 encryption_key = int (input ("\t Enter encryption key\n >>> " ))
58 message_original = str (input ("\t Enter your message\n >>> " ))
6-
9+
710 message_encrypted = ""
811
912 for char in message_original :
3235 message_encrypted += chr (char_unicode_new )
3336
3437 print ("Encrypted message : " + message_encrypted )
35-
36- user_input = input ("\t Press enter to continue encrypting messages. Enter 'quit' to exit the program\n >>> " )
3738
39+ main ()
40+
41+ if __name__ == __main__ :
42+ main ()
You can’t perform that action at this time.
0 commit comments