add in python

Solutions on MaxInterview for add in python by the best coders in the world

showing results for - "add in python"
Lotta
07 May 2018
1# This program adds two numbers
2
3num1 = 1.5
4num2 = 6.3
5
6# Add two numbers
7sum = float(num1) + float(num2)
8
9# Display the sum
10print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
11
Lois
16 May 2019
1a = 6
2b = 12
3c = a + b
4#That is how you can add two numbers or variables