Answered step by step
Verified Expert Solution
Link Copied!

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.

image text in transcribed

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: 49

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

Students also viewed these Databases questions

Question

My opinions/suggestions are valued.

Answered: 1 week ago