This is an example program that demonstrates how you can perform the addition of two user given numbers in Python.
In this program first we are taking two integer numbers from the user, and then displaying the result of addition into the console.
Program
# Take two numbers from user num1 = float(input('Enter 1st number : ')) num2 = float(input('\nEnter 2nd number : ')) # Add them result = num1 + num2 # Print the result print("\nResult = ", result)
Output
Enter 1st number : 10
Enter 2nd number : 40
Result = 50