Answer 4

mail@pastecode.io avatar
unknown
python
a month ago
680 B
6
Indexable
Never
num1 = float(input("Enter the first number: "))
num2 = float(input("Enter the second number: "))

addition = num1 + num2
subtraction = num1 - num2
multiplication = num1 * num2
division = num1 / num2
modulus = num1 % num2
exponentiation = num1 ** num2
floor_division = num1 // num2

print("Addition:", num1, "+", num2, "=", addition)
print("Subtraction:", num1, "-", num2, "=", subtraction)
print("Multiplication:", num1, "*", num2, "=", multiplication)
print("Division:", num1, "/", num2, "=", division)
print("Modulus:", num1, "%", num2, "=", modulus)
print("Exponentiation:", num1, "**", num2, "=", exponentiation)
print("Floor Division:", num1, "//", num2, "=", floor_division)
Leave a Comment