I need a python program called simulated_editor Include a menu offering the following items: 1. Input...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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. 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.
Expert Answer:
Answer rating: 100% (QA)
Heres a Python program called Simulated Editor with the menu options you mentioned python import math def inputstring global userinput userinput input... View the full answer
Related Book For
Mathematical Applications For The Management, Life And Social Sciences
ISBN: 9781337625340
12th Edition
Authors: Ronald J. Harshbarger, James J. Reynolds
Posted Date:
Students also viewed these programming questions
-
A pharmaceutical firm receives approval for marketing a drug in country A and country B. The demand function for this drug in countries A and B are p=84-2x and p=124-3x respectively, where p is the...
-
9.1 Exercise (JDK Source Code): Extract the source code of the class Math from the JDK source code ("$JAVA_HOME" "src.zip" "Math.java" under folder "java.lang"). Study how constants such as E and...
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Why do we use the absolute value of x or of g(x) in the derivative formulas for the natural logarithm?
-
A large cube of glass has a metal reflector on one face and water on an adjoining face (Fig. 33.52). A light beam strikes the reflector, as shown. You observe that as you gradually increase the angle...
-
Using LabVIEW, the Control Design and Simulation Module, and the Math Script RT Module, open and customize the Interactive Root Locus VI from the Examples to implement the system of Problem 64....
-
The probability that a wafer contains a large particle of contamination is 0.01. If it is assumed that the wafers are independent, what is the probability that exactly 125 wafers need to be analyzed...
-
As a manufacturer of athletic shoes whose image, indeed performance, is widely regarded as socially responsible, you find your costs increasing. Traditionally, your athletic shoes have been made in...
-
An electricity company pays today a dividend $ 1 . 6 4 per share and the share price is $ 2 7 . If the expected yield is 1 0 % what will be the dividend growth rate?
-
It is December of 2020 and Frankie and Kensley Nguyen have come to you to discuss their 2020 tax situation and some changes they are proposing for the future. They are a married couple and have no...
-
To qualify for recovery, damages must: a minor breach of contract be foreseeable to the parties at the time of the breach be foreseeable to the parties at the time the contract is formed a major...
-
Intermediate Accounting I is a comprehensive analysis of financial accounting topics, including the preparation of financial statements and external reports. The aim is to identify and analyze...
-
Activity at the Clarkson Company for the first six months of 2023 was slow. At the end of June, the company borrowed $30,000. During the first six months of 2023, the sales revenue, including sales...
-
ABC accquired XYZ in a merger. There are 2 transactions that need to be recorded in ABC's Xero ledger to finalise the accounts on 30 June 2022.The details of the unrecorded transaction are below....
-
1 1 1 1 2 3] Suppose A=1 1 -1 B=-1 -2 4, find A+2B. 1 05 1
-
A company may purchase a portion of its inventory at different prices over time. For example it may purchase one shipment at $10 per unit and another shipment at $15 per unit later in the year. When...
-
AP Vianne is the management accountant for Divvy, a bike-sharing service in Chicago. She is trying to plan for summer activity by using the most recent ridership information provided. She needs to...
-
1. What are some current issues facing Saudi Arabia? What is the climate for doing business in Saudi Arabia today? 2. Is it legal for Auger's firm to make a payment of $100,000 to help ensure this...
-
Evaluate the integrals in Problem. Check your results by differentiation. x 3 - 3x (x 2 - 1) dx
-
Forty-six percent of marijuana use among youth occurs in the inner cities. If an instance of such marijuana use is chosen at random, what is the probability that the use occurs in an inner-city?
-
Evaluate the integrals in Problem. dx
-
Consider the Gompertz model in Eq. (12.35). Graph the expectation function for \(\theta_{1}=1, \theta_{3}=1\), and \(\theta_{2}=\frac{1}{8}, 1,8,64\) over the range \(0 \leq x \leq 10\). Equation...
-
Reconsider the regression models in Problem 12.6, parts a-e. Suppose the error terms in these models were multiplicative, not additive. Rework the problem under this new assumption regarding the...
-
Reconsider the data in the previous problem. The response measurements in the two columns were collected on two different days. Fit a new model \[ y=\theta_{3} x_{2}+\theta_{1} e^{\theta_{2}...
Study smarter with the SolutionInn App