Follow each iteration, fill in the trace table, and check your answers cell by cell.
Learning focus: trace range(), positive and negative steps, output, running totals, conditions, and strings.
Completed: 0 / 6
The exercises need JavaScript. If they do not appear, check that the complete code was inserted in HTML mode.
How to trace: each row is one execution of the loop body. Write the current loop value first, then follow the statements in their order in the code. The iteration number is already filled in.
1
Python code
Trace table · scroll sideways on small screens
correct cell check this value
All six trace tasks completed
You have traced numeric ranges, an accumulator, a condition and iteration through a string.