What is the output of this program?
2 answers:
Answer:
The output is 20
Explanation:
Given:
<em>numA = 2
</em>
<em>for count in range(5,8):
</em>
<em> numA = numA + count
</em>
<em>print(numA)</em>
<em />
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


Hence, the output is 20
Answer:
20
Explanation:
assuming the print statement is not indented, the program effectively calculates 2+5+6+7.
The range(...) is <em>excluding </em>the end value (8 in this case).
You might be interested in
Answer:
credit karma
Explanation:
karma is -69
A network is used to configure data sources for applications that require access to a database?
EDSAC is the first computer ever
Answer:
answer is D
Explanation:
as the block returns the number of array members, the most likely scenario is the last one.