Dremendo Tag Line

Input 2 numbers and find their sum in Python

input() - Question 1

In this question, we will see how to input two numbers in Python programming using the input() function and find their sum. To know more about input() function click on the input() function lesson.

Q1) Write a program in Python to input two numbers and find their sum.

Program

print('Enter 2 numbers')
a=int(input())
b=int(input())
c=a+b
print('Sum={}'.format(c))

Output

Enter 2 numbers
15
26
Sum=41
video-poster