Basic Programs

Python Program to Add Two Numbers With User Input

In this program, you will learn to add two numbers with user input and display the sum value using print() function.
a=float(input("Enter First Number : "))
b=float(input("Enter Second Number : "))
print("Sum of {} and {} is {} ".format(a,b,c))


Enter First Number : 25
Enter Second Number : 36
Sum of 25 and 36 is 61


  • input() method used to get input from the user
  • float() method used to convert a string to a floating-point value.
  • format() method used to format the string with given value.

Prev Next