Create a program that will accept two numbers and print the product, quotient, sum, difference, remainder, exponent, and floor division. First number will be the left operand for quotient, difference, remainder, exponent, and floor division.
n1 = int(input('Number 1: '))
n2 = int(input('Number 2: '))
print(f'Product: {n1 * n2}')
print(f'Quotient: {n1 / n2}')
print(f'Sum: {n1 + n2}')
print(f'Difference: {n1 - n2}')
print(f'Remainder: {n1 % n2}')
print(f'Exponent: {n1 ** n2}')
print(f'Floor division: {n1 // n2}')
Comments
Leave a comment