1# With inputs
2Number1 = int(input("Write the first number:- "))
3Number2 = int(input("Write the second number:- "))
4Sum = Number1 + Number2
5print(Sum)
1firstNumber = 3
2secondNumber = 4
3
4sum = firstNumber + secondNumber
5print(sum)
6
7# Output : 7
1a = int(input("Enter first number:"))
2b = int(input("Enter second number:"))
3sum = a+b
4print(sum)
1# This program adds two numbers
2
3num1 = 1.5
4num2 = 6.3
5
6# Add two numbers
7sum = float(num1) + float(num2)
8
9# Display the sum
10print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
11
1# Store input numbers
2num1 = input('Enter first number: ')
3num2 = input('Enter second number: ')
4
5# Add two numbers
6sum = float(num1) + float(num2)
7
8# Display the sum
9print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))