Program Requirements: You will develop a program capable of encrypt and decrypting text using Caesar cipher. In order to do this, you will be required to implement several functions, specified in the template provided. Once complete, your programs main() method should do the following: 1. Prompt users to select a mode (encrypt or decrypt). 2. Check if the mode the user entered is valid. If not, continue to prompt the user until a valid mode is selected.
Program Requirements:
You will develop a program capable of encrypt and decrypting text using Caesar cipher. In order
to do this, you will be required to implement several functions, specified in the template
provided.
Once complete, your programs main() method should do the following:
1. Prompt users to select a mode (encrypt or decrypt).
2. Check if the mode the user entered is valid. If not, continue to prompt the user until a
valid mode is selected.
3. Prompt the user for the message they would like to encrypt or decrypt.
4. Encrypt or decrypt the message as appropriate and print the output.
5. Prompt the user whether they would like to encrypt or decrypt another message.
6. Check if the user has entered a valid input (y/n) If not, continue to prompt the user until
they enter a valid response. Depending upon the response you should either:
a. End the program if the user selects no.
b. Proceed directly to step 2 if the user says yes.
You should use a loop to keep the
to encrypt or decrypt more messages.
Your program should handle both uppercase and lowercase inputs. You can use
str.upper() and str.lower() to convert strings to a specific case. However, you should
only output only uppercase messages.
Please, I'm begging you use Python as Java is literally 0 use for me, the template is a MUST, A MUST, so anything else is not helful for me at all, please use Python as this is my 3rd attempt to get help with it in Python and all I receive is Java. Thank you
![Full Implementation (user input in red)
Welcome to the Caesar Cipher
This program encrypts and decrypts text using Caesar Cipher.
Would you like to encrypt (e) or decrypt (d): d
Would you like to read from a file (f) or the console (c)? c
What message would you like to decrypt: LIPPS ASVPH
What is the shift number: 4
HELLO WORLD
Would you like to encrypt or decrypt another message? (y/n): y
Would you like to encrypt (e) or decrypt (d): e
Would you like to rea from a file (f) or the console
What message would you like to encrypt: Hello World
What is the shift number: 4
(c) ? c
LIPPS ASVPH
Would you like to encrypt or decrypt another message? (y/n): y
Would you like to encrypt (e) or decrypt (d): e
Would you like to read from a file (f) or the console (c) ? f
Enter a filename: something_silly.txt
Invalid Filename
Enter a filename: messages.txt
What is the shift number: 4
6
Output written to results.txt
Would you like to encrypt or decrypt another message? (y/n): n
Thanks for using the program, goodbye!](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fba87a338-86ce-43b8-9eb9-6a97197ccbb8%2F41fa2a62-6889-4c90-8f7a-64522048f043%2F59f5n7n_processed.jpeg&w=3840&q=75)
![# A Caesar Cipher Program
import os.path
def welcome ():
# add your code here
return
def enter_message():
mode = ''
message =
shift = 0
# add your code here
return (mode, message, shift)
def encrypt (message, shift):
# add your code here.
return
def decrypt (message, shift):
# add your code here
return
def process_file(filename, mode, shift):
list_messages = []
# add your code here
return list_messages
def write_messages (lines):
# add your code here
return
def is file (filename):
return False
def message_or_file():
11
MUST
USE
TEMPLATE
mode=
filename = None
message
None
shift = 0
# add your code here
return (mode, message, filename, shift)](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fba87a338-86ce-43b8-9eb9-6a97197ccbb8%2F41fa2a62-6889-4c90-8f7a-64522048f043%2F6n194i6_processed.jpeg&w=3840&q=75)
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 2 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Computer Networking: A Top-Down Approach (7th Edi…](https://www.bartleby.com/isbn_cover_images/9780133594140/9780133594140_smallCoverImage.gif)
![Computer Organization and Design MIPS Edition, Fi…](https://www.bartleby.com/isbn_cover_images/9780124077263/9780124077263_smallCoverImage.gif)
![Network+ Guide to Networks (MindTap Course List)](https://www.bartleby.com/isbn_cover_images/9781337569330/9781337569330_smallCoverImage.gif)
![Concepts of Database Management](https://www.bartleby.com/isbn_cover_images/9781337093422/9781337093422_smallCoverImage.gif)
![Prelude to Programming](https://www.bartleby.com/isbn_cover_images/9780133750423/9780133750423_smallCoverImage.jpg)
![Sc Business Data Communications and Networking, T…](https://www.bartleby.com/isbn_cover_images/9781119368830/9781119368830_smallCoverImage.gif)