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 programming running if the user says that he/she would like 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. (Use the template used in the picture, it is a MUST, or the resolving is not taken in consideration as the exaple says, I need to learn to do it as the template shows , thanks) (Please make it in python, I struggle at some points so a full resolvation made exactly like how the template was done will be spot on, thanks again)

LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
5th Edition
ISBN:9781337569798
Author:ECKERT
Publisher:ECKERT
Chapter7: Working With The Bash Shell
Section: Chapter Questions
Problem 5DE
icon
Related questions
Question

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 programming running if the user says that he/she would like
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.

(Use the template used in the picture, it is a MUST, or the resolving is not taken in consideration as the exaple says, I need to learn to do it as the template shows , thanks)

(Please make it in python, I struggle at some points so a full resolvation made exactly like how the template was done will be spot on, thanks again) 

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!
Transcribed Image Text: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!
# 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)
Transcribed Image Text:# 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)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 4 steps with 3 images

Blurred answer
Knowledge Booster
Reference Types in Function
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
LINUX+ AND LPIC-1 GDE.TO LINUX CERTIF.
Computer Science
ISBN:
9781337569798
Author:
ECKERT
Publisher:
CENGAGE L
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning