Answer:
num1 = 1.5
num2 = 6.3
sum = num1 + num2
print('The sum of {0} and {1} is {2}'.format(num1, num2, sum))
Step-by-step explanation:
This program adds up two numbers.
- num1 = 1.5 means that a variable called num1 has been assigned to the number 1.5
- num2 = 6.3 means that a variable called num2 has been assigned to the value 6.3
- sum = num1 + num2 means that the variables num1 and num2 have been added together and their total has been assigned to the new variable sum
- print('The sum of {0} and {1} is {2}'.format(num1, num2, sum)) means that the text that will be printed shall read out the sum of their answers formatted with brackets that are kept in place of their respective variables.