For a loop to stop, the loop control variable must ______________. {Ans: change inside the loop}What does the following loop do? val = 0 total = 0 while (val < 10): val = val + 1 total = total + val print(total) {Ans: Prints the sum of the numbers from 1 to 10.}Which of the following is NOT a rule for algorithms? {Ans: They repeat indefinitely.}Consider the following code: val = 0 while (val < 10): val = val - 1 print (val) What is the error? {Ans: The loop will not stop since val is counting the wrong direction.}When do you use a "for" loop instead of a "while" loop? (There may be more than one answer.) (2 answers) {Ans: -You know how many times you want the loop to run. -When there is a defined start and end}What is output by the following code? for x in range (4): for y in range (3): print("*", end=" ") print("") {Ans: * * * * * * * * * * * *}What is output? Select all that apply. c = 6 while (c > 0): print (c) c = c - 2