63 826
Assignments Done
99,3%
Successfully Done
In August 2018

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
Expert's answer

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 first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions