Welcome to Westonci.ca, where finding answers to your questions is made simple by our community of experts. Experience the ease of finding reliable answers to your questions from a vast community of knowledgeable experts. Our platform provides a seamless experience for finding reliable answers from a network of experienced professionals.


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.


Sagot :

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

We hope you found what you were looking for. Feel free to revisit us for more answers and updated information. We appreciate your time. Please come back anytime for the latest information and answers to your questions. Find reliable answers at Westonci.ca. Visit us again for the latest updates and expert advice.