# python adding two numbers {python program to add two numbers without using +}

## Example: 1

``````a = int(input("enter first number: "))
b = int(input("enter the second number: "))

sum = a + b

print("sum:", sum)``````

Output
enter first number: 10
enter the second number:10
sum: 20

## Example: 2

``````# adds two numbers

num1 = 2.5
num2 = 5.5

sum = num1 + num2

# Display
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))``````

Output

The sum of 2.5 and 5.5 is 8

## Example: 3

``````#  input any numbers
num1 = input('Enter first number: ')
num2 = input('Enter second number: ')

sum = float(num1) + float(num2)

# Display the output
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
``````

Output

Enter first number: 12
Enter second number: 10
The sum of 12 and 10 is 22

## Example: 4

``````x = input("Type 1st number: ")
y = input("Type 2nd number: ")

sum = int(x) + int(y)

print("Total sum is: ", sum)``````

Output
Type a number: 22
Type another number:22
The sum is: 44

## Example: 5

``````#Add two numbers

num1=7
num2=10
print("1st number :",num1)
print("2nd number :",num2)

First number: 5
Second number: 10