Skip to content
Your progress

Checking your sign-in…

Who's learning?

Each profile keeps its own read lessons, badges, streak, and practice scores on this device.

Computing & AI Class 9

Computational Thinking III: Functions & Debugging

Name, call and return a function — then trace, predict and halve to find bugs.

11 lessons · ~61 min total

Track progress — 0 of 11 lessons read 0%

Lessons in this topic

  1. 0 Start here Name a group of lines, hand it values, take one back. Then find bugs. · 3 min You are here
  2. 1 A name for a group of steps A function gives a group of lines one name. The printed lines stay the same. · 5 min
  3. 2 What you hand it, and what each end is called A parameter is a name in the definition. An argument is the value at the call. · 6 min
  4. 3 The value it hands back `return` sends one value out of a function. Printing is a different job. · 6 min
  5. 4 One call inside another A call is a value, so it fits inside another call. The inner call runs first. · 6 min
  6. 5 A print in the middle A `print` in the middle shows what a box held at that moment. · 6 min
  7. 6 One line at a time A trace table shows every box after every line. · 6 min
  8. 7 Predict, then run Write down what each line should print. Then run it and compare. · 6 min
  9. 8 Halve the hunt Check the middle line. Drop the half that cannot hold the fault. · 6 min
  10. 9 The big picture Four ideas that build a function. Four that find a fault. · 3 min
  11. 10 Track quiz A cheat-sheet table and a reveal quiz, one question for each idea. · 8 min