lease do this in Python: TEXT-BASED CALCULATOR PROJECT OPERATION CONTROLS '+' for addition '-' for subtraction '*' for multiplication '/' for division 'r' or 'R' to find the square, cube, etc. root (entered as an integer) 'x' or 'X' to take to a power of x '(' and ')' to establish order of precedence '=' to perform the calculation entered 'e', 'E', 'q', or 'Q' to exit the Calculato
lease do this in Python: TEXT-BASED CALCULATOR PROJECT OPERATION CONTROLS '+' for addition '-' for subtraction '*' for multiplication '/' for division 'r' or 'R' to find the square, cube, etc. root (entered as an integer) 'x' or 'X' to take to a power of x '(' and ')' to establish order of precedence '=' to perform the calculation entered 'e', 'E', 'q', or 'Q' to exit the Calculato
C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter1: Fundamentals Of C++ Programming
Section1.3: Preliminary Three: Software Development
Problem 7E: (Statistics) This is the formula for the standard normal deviate, z, used in statistical...
Related questions
Question
Please do this in Python:
TEXT-BASED CALCULATOR PROJECT OPERATION CONTROLS
- '+' for addition
- '-' for subtraction
- '*' for multiplication
- '/' for division
- 'r' or 'R' to find the square, cube, etc. root (entered as an integer)
- 'x' or 'X' to take to a power of x
- '(' and ')' to establish order of precedence
- '=' to perform the calculation entered
- 'e', 'E', 'q', or 'Q' to exit the Calculator
USER EXPERIENCE
- Must display the message "Welcome to the Text-Based Calculator" when program begins.
- Must display the message "Thank you for using the Text-Based Calculator" when program exits.
- Must display the prompt "Input: " to solicit user input.
- User input must be terminated with an '=' sign.
- Spaces must be ignored, if present.
- Operations are performed left-to-right in the order they appear.
- Must show entire line to be computed along with the result after the '=' sign.
- Output line must be properly formatted to show spacing between numbers and operators.
- Integer candidate values must display as integers (i.e. 5.0 displays as 5).
- Floats must display to the minimum necessary precision (i.e 5.55000 displays as 5.55).
- Arithmetic errors such as 'divide-by-zero' must be intercepted and reported.
- Syntax errors such as consecutive operators or invalid terms must be intercepted and reported.
CODE REQUIREMENTS
- Your code must include at least one private variable.
- Your code must include at least one function.
- Your code must include at least one 'while' statement.
- Your code must include at least one 'for' statement.
- Your code must include at least one 'if/else' statement.
- Your code must include at least one 'list' and/or one 'dictionary'.
- Your code must include at least one 'try/except' block.
- Your code must not exceed 150 lines in total.
PROGRAM EXECUTION EXAMPLE
Welcome to the Text-Based Calculator |
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 6 steps with 3 images
Knowledge Booster
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.Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage