Lesson 2.1 · Trace it
Trace: if age
Python code4 rows to fill2 marks
Complete the trace table for this Python code. [2]
Line 1: age = 16Line 2: limit = 18Line 3: if age >= limit:Line 4, indented 1 level: print("Yes")Line 5: age = age + 1Line 6: print(age)
Fill in one row each time a line changes age or limit, or prints something. The table already has the right number of rows. In each row, write only what that line changes; you can leave the other cells empty or copy their values down. Write values the way Python shows them: 3 and 3.0 are different, and text goes in quotes. In the output column, write exactly what appears on screen, with no quotes around it.
| Row | age | limit | output |
|---|---|---|---|
| 1 | |||
| 2 | |||
| 3 | |||
| 4 |