0% found this document useful (0 votes)
17 views

Python Calc

The program prompts the user to input two numbers, performs basic math operations on them like addition, subtraction, multiplication, division, and displays the results.

Uploaded by

Jozu the Great
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Python Calc

The program prompts the user to input two numbers, performs basic math operations on them like addition, subtraction, multiplication, division, and displays the results.

Uploaded by

Jozu the Great
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

a = int(input("Enter your first number (b): "))

b = int(input("Enter your second number (b): "))

product = a*b
print("Product (a*b): " + str(product))

quotient = a/b
print("Quotient (a/b): " +str(quotient))

sum = a+b
print("Sum (a+b): " +str(sum))

difference = a-b
print("Difference (a-b): " +str(difference))

remainder = a%b
print("Remainder (a%b): " +str(remainder))

exponent = a**b
print("Exponent (a**b): " +str(exponent))

floordiv = a//b
print("Floor Division (a//b): " +str(floordiv))

You might also like