Home » Blog » Python Program to Add Two Numbers

# Python Program to Add Two Numbers ## Simple Program to add Two Numbers and Display on the output screen

To properly understand this example i.e Addition two Number, you should have the knowledge of following Python programming topics:

1. Input, Output, and Import
2. Variables and Data Types
3. Operators

In the following program, we have used the arithmetic addition operator i.e (+) to adds two number.

#### Program to Add Two Number

``````num1 = 1.5
num2 = 6.3

sum = float(num1) + float(num2)

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

Output

``The sum of 1.5 and 6.3 is 7.8``

As mentioned above Python uses all the mathematic operation so by Changing (+) operator, we can subtract (-), multiply (*), divide (/), floor divide (//) or find the remainder (%) of two numbers.

Related Program

Ask your questions and clarify your/others doubts on Addition of two Number in Python by commenting. Python Documentation