1. Python Program to Calculate Addition and Subtraction of two Numbers.
How does this program work?
- In this program you will learn about how to find addtion and subtraction of two numbers using Python.
- Initially The integer entered by the user is stored in two variables a,b.
- After that by using the given formula you will get output.
Here is the code
a = int(input("Enter first number: "))
b = int( input("Enter second number: "))
Sum = a+b; #Add two numbers
Difference = a-b; #Subtract two numbers
# To print the result
print("Addition of two numbers = ",Sum)
print("Subtraction of two numbers = ",Difference)