I’m learning to code
- Trace a value — Read the variables guide and predict a value before running the example.
Example and completion check
Start with points = 3, then points = points + 2. Write the value after each line. Change the starting value to 0 and predict the result again before checking it.
Ready to move on? You can explain why the second assignment reads the old value and stores a new one: the first run ends at 5.
- Spot a boundary mistake — Try the first two debugging exercises. Explain why the loop stops where it does.
Example and completion check
For the first gym exercise, list the indices of [2, 4, 6]: 0, 1 and 2. Compare those with the indices produced by the original loop. In the next exercise, distinguish text from a number.
Ready to move on? You can identify the omitted final index and explain why converting valid numeric text differs from concatenating strings.
- Follow a decision — Use the Python course outline to find a conditions lesson and write your own example.
Example and completion check
Try a rule that accepts ages of 18 or above. Trace inputs 17, 18 and 19 through the condition. Write which branch runs and why the exact boundary matters.
Ready to move on? Your rule includes 18, rejects 17 and has an explanation for each branch. Check the conditions lesson rather than guessing syntax.
- See values move — Step through one sorting pass and predict the next swap.
Example and completion check
Load [5, 1, 4, 2]. Before each Next step, predict whether the highlighted neighbours will swap. Write the list at the end of pass one.
Ready to move on? You obtain [1, 4, 2, 5] and can explain why 5 is settled while 4 and 2 still need work.
- Test the edge cases — Make a three-case test plan: normal, empty and boundary input.
Example and completion check
Choose a function that totals a list. Write expected outputs for [2, 4], [] and [0]. Explain which requirement each test checks.
Ready to move on? Your expected totals are 6, 0 and 0. You can distinguish an empty input from an input containing zero.
- Read unfamiliar code — Use a documentation example and explain one line you did not understand before.
Example and completion check
Pick one short documentation example. Identify its inputs, returned value and one unfamiliar operation. Change one input on paper and predict the effect before trying it locally.
Ready to move on? You can explain the changed line without copying the documentation wording, and you know where to check an uncertain detail.
- Explain a small achievement — Build a truthful story about a program or exercise you completed this week.
Example and completion check
Choose an exercise you actually finished. Describe what was confusing, what you tried, how you checked the result and what you would do next. Copy or download the draft before leaving.
Ready to move on? Your story names your own action and a real check. It does not claim a course exercise was professional work.