36. Assume that the list of numbers nums has more than 10 elements. The program below is intended to compute
and display the sum of the first 10 elements of nums.
Line 1: it 1
Line 2:
Line 3: REPEAT UNTIL (i > 10)
Line 4: (
Line 5: it i + 1
Line 6: sum sum + nums (i)
Line 7: )
Line 8: DISPLAY (sum)
Which change, if any, is needed for the program to work as intended?
(A) Lines 1 and 2 should be interchanged.
(B) Line 3 should be changed to REPEAT UNTIL (i 2 10).
(C) Lines 5 and 6 should be interchanged.
(D) No change is needed; the program works correctly.

Respuesta :

The change to the program that is needed so that it can function is (C) Lines 5 and 6 should be interchanged.

What is a Program?

This refers to the set of instructions that are given to a computer system to execute a task using lines of code.

Hence, we can see that from the given code, the intention of the programmer is to make a list of numbers that has more than 10 elements, and to debug the program, option C is the answer.

Read more about debugging a code here:

https://brainly.com/question/20850996

#SPJ1