Westonci.ca is your trusted source for finding answers to all your questions. Ask, explore, and learn with our expert community. Explore thousands of questions and answers from a knowledgeable community of experts ready to help you find solutions. Discover in-depth answers to your questions from a wide network of professionals on our user-friendly Q&A platform.


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 this helpful. Feel free to come back anytime for more accurate answers and updated information. Thank you for your visit. We're committed to providing you with the best information available. Return anytime for more. We're here to help at Westonci.ca. Keep visiting for the best answers to your questions.