Answer to Question #70180 in Python for Cayla

Question #70180
you will write a program that prompts the user for two integers and one of the 4 basic
mathematical operations. The only valid choices are: add, subtract, multiply, or divide (use true division and
not integer division). The user can type the operation using any combination of upper case and lower case
letters. If the user types in an operation that is not defined, the program should simply tell the user the
operation is not a valid operation (See sample run 1). Assuming the user’s operation is defined, you will
perform the operation, print the operands, print the operation (the way the user typed it), and the result. If the
second integer input is zero and the desired operation is division, don’t print the result, instead print that
“Division by zero is not allowed” (See sample run 2). After printing the result, display a line and print out any
of the three messages below that is true:
Both operands were negative
Both operands were positive
The result has three or more digits in it
1
Expert's answer
2017-09-22T09:10:06-0400
The answer to the question is available in the PDF file https://www.assignmentexpert.com/https://www.assignmentexpert.com/homework-answers/programming-answer-70180.pdf

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS