Given two numbers num1 and num2. Write a Python program to perform the addition of given two numbers and print the output sum.
Example: Given: num1 = 10, num2 = 20 Output: 30 Given: num1 = 5, num2 = 8 Output: 13
Example Python Code:
# take input from the user num1 = input("Enter a number: ") num2 = input("Enter another number: ") # add the two numbers sum = float(num1) + float(num2) # print the result print("The sum of {0} and {1} is {2}".format(num1, num2, sum))
Enter a number: 12
Enter another number: 41
The sum of 12 and 41 is 53.0






















Trends is an amazing magazine Blogger theme that is easy to customize and change to fit your needs.