### How to add number in python

To  understand how to add the two number in the python ,first of all you have know how to take input

in python and display output in python.

Following is the example code for add the two in python:

# the following code  adds two numbers by assigning value to variables

number1 = 7

number2 = 4.7

sum = number1 + number2

# Now Display the sum

print('The sum of {0} and {1} is {2}'.format(number1, number2, sum))

Now we will see how add numbers with the help of taking input from the user.

## Example code:Add the two number by user input

# the following code  taking two number from the user then

number1 = input('Enter first number: ')

number2 = input('Enter second number: ')

sum = float(number1) + float(number2)

# Now Display the sum

print('The sum of {0} and {1} is {2}'.format(number1, number2, sum))

In the above example,we take input with the help of input function input( ) which takes input as string

and later we convert it into float for performing addition operation. At the last we display with the help of a

print function .

Hopefully,it we will helpful for your coding comment below if any problem in understanding.