Skip to content
Home » Python Program to Add (+) Two Numbers

Python Program to Add (+) Two Numbers

Learn about Python Program to Add (+) Two Numbers in the below code example. Also, refer to the comments in the code snippet to get a detailed view about what’s actually happening.

Python Program to Add (+) Two Numbers

This is a simple python program of adding two numbers using + operator.

# python program to add two numbers

num1 = 5
num2 = 10

# add two numbers
sum = num1 + num2

# displaying the addition result
print('{0} + {1} = {2}'.format(num1, num2, sum))

Output:

5 + 10 = 15

Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.

Similar Code : Swap Two Numbers Python