Python program for addition, subtraction, multiplication and division has been shown here. These are the basic arithmetic operations.
Page content(s):
Additional content(s):
1. Python program & output for Addition, Subtraction, Multiplication & Division
Code has been copied
#****************************************** # alphabetacoder.com # Python program for addition, subtraction, # multiplication and division #****************************************** # take input a = float(input("Enter first number: ")) b = float(input("Enter second number: ")) # compute operations w = a + b x = a - b y = a * b z = a / b # display result print("Addition:", w) print("Subtraction:", x) print("Multiplication:", y) print("Division:", z)
Output
Enter first number: 15.6
Enter second number: 7.5
Addition: 23.1
Subtraction: 8.1
Multiplication: 117.0
Division: 2.08