python program to obtain three numbers and print their sum

Programming Example

Python program to obtain three numbers and print their sum.

Solution

num1=int(input("Enter Number 1 : "))
num2=int(input("Enter Number 2 : "))
num3=int(input("Enter Number 3 : "))
sum=num1+num2+num3
print("Three Numbers are : ",num1,num2,num3)
print("Sum is : ",sum)
Output

Enter Number 1 : 5

Enter Number 2 : 4

Enter Number 3 : 3

Three Numbers are :  5 4 3

Sum is :  12