gistlib
To sum three numbers in Python, you can simply use the addition operator + between the three numbers.
+
main.pynum1 = 5 num2 = 10 num3 = 15 total = num1 + num2 + num3 print("The sum is:", total) 86 chars8 lines
num1 = 5 num2 = 10 num3 = 15 total = num1 + num2 + num3 print("The sum is:", total)
This will output The sum is: 30
The sum is: 30
gistlibby LogSnag