Question: This Python module will be menu driven and use conditions to check user input in order to determine which operation to perform based on the
This Python module will be menu driven
and use conditions to check user input in order to
determine which operation to perform based on the
users menu selection.
The output should look like the attached example output.
The menu will have the following selections
(NOTE: all menu selections by the user should not be case
sensitive)
:
1.
CC Character Count
a.
This operation will prompt the user for a string
b.
The number if characters will be counted in the string
c.
Display the number of characters in the string to the user
2.
RV Reverse
a.
This operation will prompt the user for a string
b.
The string will be reversed
c.
Display the reversed string to the user
3.
M5 Multiply by 5
a.
This operation will prompt the user for a choice between N for a number and S for a String
b.
If N is entered:
i.
Prompt the user to enter a number
ii.
The number will then be multiplied by 5
iii.
Display the result of multiplying the number by 5 to the user
c.
If S is entered:
i.
Prompt the user to enter a string
ii.
The string will then be multiplied by 5
iii.
Display the result of multiplying the string by 5 to the user
d.
If any character other than N or S is entered:
i.
Display the message You entered an invalid option! to the user
e.
NOTE: all input by the user for this menu option should not be case sensitive
4.
MC
Middle Character(s)
a.
This operation will prompt the user for a string
b.
If the
string has an odd number of characters:
i.
Determine the middle character of the string
ii.
Display the single middle character to the user
c.
If the string has an even number of characters:
i.
Determine the middle characters of the string
ii.
Display the 2 middle characters to the user
5.
EX' Exit
a. This operation will display Goodbye! to the user
NOTE
:
If any menu selection other than CC, RV, M5, MC, or EX or the lowercase version of these is entered:
Display the message You entered an invalid menu selection to the user
At the end of the Python module print the string End of Project #3'
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
