Question
Problem 1 Write a program that performs the function of a simple integer calculator. This program should ask the user for an operation (including the
Problem 1
Write a program that performs the function of a simple integer calculator. This program should ask the user for an operation (including the functionality for at least addition, subtraction, multiplication, and long division) and after the user has selected a valid operation, ask the user for the two operands (i.e., the integers used in the operation). If the user enters an invalid operation, the program should print out a message telling them so.
Hint: Note that long division of integers requires that you provide both a quotient and a remainder you can refer to https://docs.python.org/3/library/stdtypes.html or lecture notes if you do not recall how to compute the remainder when you divide two integers.
Sample Output-1 (user input highlighted)
(A)ddition
(S)ubtraction
(M)ultiplication
(D)ivision (Long)
Please select an operation from the list above: Vaporize
This program does not support the operation "Vaporize".
Sample Output-2 (user input highlighted) (
A)ddition
(S)ubtraction
(M)ultiplication
(D)ivision (Long)
Please select an operation from the list above: M
Please provide the 1st integer: 3
Please provide the 2nd integer: 5
3 * 5 = 15
Sample Output-3 (user input highlighted)
(A)ddition
(S)ubtraction
(M)ultiplication
(D)ivision (Long)
Please select an operation from the list above: D
Please provide the 1st integer: 16
Please provide the 2nd integer: 3
16 / 3 = 5 with remainder 1
use python
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started