Write a Python program to print the sum of two numbers.
In mathematics, summation is the addition of a sequence of numbers; the result is their sum or total. The numbers to be summed may be integers, rational numbers, real numbers, or complex numbers.
Program:
1 2 3 4 5 6 7 8 9 10 |
num1 = 10 num2 = 8.5 # Add two numbers sum = int(num1) + float(num2) # Result Sum print('{0} + {1} = {2}'.format(num1, num2, sum)) |
Output: