Skip to content
Home » Python Programs » Python Program to Add Two Numbers With User Input

Python Program to Add Two Numbers With User Input

Basic python program to add two numbers with user input. In the Python programming language, two numbers are added. Learn basic python program from the beginning to become a master of python program. For beginners, we have printed the element using the third variable in Python.

Operators in Python

Operators are special symbols in Python that perform arithmetic or logical computations. The value on which the operator operates is referred to as the operand. 

An arithmetic operator is a mathematical function that performs a calculation on two operands. They are used in everyday arithmetic, and most computer languages include a set of such operators that can be used within equations to perform a variety of sequential calculations. Using this operator in this program we have execueted this python program to add two numbers with user input

Python Program to Add Two Numbers With User Input

a = input("First number")
b = input("\nSecond number")
sum = float(a) + float(b)
print("The sum of {0} and {1} is {2}" .format(a, b, sum))

Output

20