Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Python program that first prompts the user to enter two integer numbers , which will be assigned to variable x and variable y
Write a Python program that first prompts the user to enter two integer numbers, which will be assigned to variable x and variable y. Then, perform the following Math operations to variables x and y:
- (1) addition
- (2) subtraction
- (3) multiplication
- (4) floating-point division (x as the dividend, y as the divisor)
- (5) integer division (x as the dividend, y as the divisor)
- (6) remainder (x as the dividend, y as the divisor)
- (7) exponentiation (x as the base, y as the exponent)
Finally, print out the calculation results.
Enter the 1st integer: 7 Enter the 2nd integer: 2 [addition] total: 9 [subtraction] difference: 5 [multiplication] product: 14 [floating-point division] quotient: 3.5 [integer division] integer quotient: 3 [remainder] remainder: 1 [exponentiation ] power: 49Step 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