python augmented assignment statements, display the results as per the output

36 Views Asked by At

Write a program which asks the user to enter an integer and then by using augmented assignment statements, display the results as per the output

Please enter the first integer: 5
Please enter the second integer: 4
5 + 4 is 9
5 - 4 is 1
5 * 4 is 20
5 / 4 is 1.25
1

There are 1 best solutions below

0
Fahad Waseem On
a = int(input("Enter the first integer: "))
b = int(input("Enter the second integer: "))
print(a, "+",b, "=", a+b)
print(a, "-",b, "=", a-b)
print(a, "*",b, "=", a*b)
print(a, "/",b, "=", a/b)