Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I need a python program called simulated_editor Include a menu offering the following items: 1. Input string 2. Length of input string 3. Display

 

I need a python program called simulated_editor Include a menu offering the following items: 1. Input string 2. Length of input string 3. Display string and its reverse separated by | character 4. Encrypt the string. 5. Find the sum of all the UNICODE values in the string 6. Find the sum of all the numeric characters in the string, convert each digit found to an int and add to a variable called digit_sum. Find the square root of digit_sum. Use the arithmetic operator to calculate the square root. 7. Display the number of vowels in string 8. Display the number of characters that are not alphabetic or numeric 9. Is the string palindromic? Display a message for both outcomes. 10. exit Requirements: Each of the menu items MUST correspond to a function you define. Each function is called with the input string as the argument Each function must return the relevant value and the result must be displayed in main as a formatted sentence. The program execution must continue to stay in a loop until the user enters 10 as the choice. When the user enters 10, the execution should terminate. Menu choices must be limited to values 1 to 10. All other values need to be handled by the exception clause and the menu displayed again. For choice 1: assume that the user will enter a string. For choices 2 to 9: if no string was entered, the program ask the user to input a string as part of handling that exception. The input string must also be returned in this case back to main For choice 6: you must handle another exception case where the input string cannot be converted to an integer. Display an appropriate error message and display the menu again to allow the user to continue The menu, the choice input and the decisions that need to be made will be in the main function and a loop structure to manage the execution. Don't forget to call main() as the last line of your file.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres a Python program called Simulated Editor with the menu options you mentioned python import math def inputstring global userinput userinput input... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mathematical Applications For The Management, Life And Social Sciences

Authors: Ronald J. Harshbarger, James J. Reynolds

12th Edition

978-1337625340

More Books

Students also viewed these Programming questions

Question

Evaluate the integrals in Problem. dx

Answered: 1 week ago

Question

Explain why a demand curve slopes downward.

Answered: 1 week ago