Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

25. Why is the following loop an infinite loop given the code before and during

ID: 3706646 • Letter: 2

Question

25. Why is the following loop an infinite loop given the code before and during the loop? while t sx -1t 100 do z $ ( (z-1) ) x-s ( (x+Y)) X-s ( (x+2)) done a. Because X never changes so it will never reach 100 b. Because X increases and then decreases by the same amount each iteration so will never reach 100 by the time the loop condition is tested c. While X increases in each iteration, it never reaches 100 d. The loop is not an infinite loop at all e. The code contains errors because there are missing semicolons

Explanation / Answer

25)

answer: b

because x increases and then decreases by the same amount each iteration so will never reach 100 by the time the loop codition is tested

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote