Addition Program in Python

or + operator is used to add two numbers in python. We can just store two numbers in two variables and use + operator to obtain the addition of those two numbers. You just need to have python installed on your system. No library nothing is needed. So let's start with it.

Python program to Add Two Numbers

# Addition program in python

# store first number in varibale a
a = 10

# store second number in variable b
b = 20

# directly display the addition using
# print(a+b)
# or save it to third variable and display
# the third varibale

C = a + b

print("Addition of two numbers is ",end="")


Addition of two numbers is 30


+ operator is used to add two numbers. print() function is used to display output on the screen or console. print() function automatically attached newline at the end of output to be displayed, the second parameter end in print() function tells it to include space instead of newline character and hence the output 30 is displayed on the same line.