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:
- Input, Output, and Import
- Variables and Data Types
- 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
# Add two numbers
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
- Python Program for Addition of Two Numbers Given by User
- Python Program to find the area of Triangle in Python
- Program to Solve Quadratic Equation in Python
- Program to Generate a Random Number
Ask your questions and clarify your/others doubts on Addition of two Number in Python by commenting. Python Documentation