M3) Decreasing sequence
The function in Listing 1 builds a string from the values visited by a for loop.
for loop with a step of -2 (Question 1).
What does mysterious_loop return for n = 0, n = 1, n = 5, and n = 6? Each visited number is followed by one space.
- n = 0:
""/ n = 1:"1 "/ n = 5:"5 3 1 "/ n = 6:"6 4 2 ". - n = 0:
"0 "/ n = 1:"1 "/ n = 5:"5 3 1 -1 "/ n = 6:"6 4 2 0 ". - n = 0:
""/ n = 1:"1 "/ n = 5:"5 3 1 -1 "/ n = 6:"6 4 2 0 ". - n = 0:
""/ n = 1:"1 "/ n = 5:"5 4 3 2 1"/ n = 6:"6 4 2 0 ".