Respuesta :
Answer:
20
Explanation:
assuming the print statement is not indented, the program effectively calculates 2+5+6+7.
The range(...) is excluding the end value (8 in this case).
Answer:
The output is 20
Explanation:
Given:
numA = 2
for count in range(5,8):
numA = numA + count
print(numA)
Required:
Determine the output
The first line of the program initializes numA to 2.
The next iteration sum up integers from 5 to 7 (i.e. 8 - 1) to the initialized value of numA
So, numA becomes
[tex]numA = 2 + 5 + 6 + 7[/tex]
[tex]numA = 20[/tex]
Hence, the output is 20