C-18-Q050mediumsingle_mcq
After the loop ends, the program displays the result with:
After the loop ends, the program displays the result with:
- a
print(count) - b
print('The sum of the value is ', sum) - c
After the loop ends, the program displays the result with:
print(count)print('The sum of the value is ', sum)input(sum)return sumAfter the loop completes, print('The sum of the value is ', sum) outputs the accumulated total with a descriptive label. The other options either print the counter, take input, or return a value (invalid outside a function).