Note-taking · 2 min read

Cornell Notes for Programming Classes: A Worked Example

Adapt the Cornell notes layout to a programming lesson using questions, code, error notes and a short summary.

The Cornell page format gives different jobs to three areas: a main notes column, a cue or question column, and a short summary at the bottom. For code-heavy classes, the main column should contain runnable examples and the cues should ask you to predict or change the code.

Worked page: Python return values

Cue or questionNotes and example
What does return do?It passes a value back to the caller. def double(x): return x * 2
What if a function only prints?The caller cannot reuse the printed result directly. A function without an explicit return returns None.
What should I test?Try double(0), double(-2) and double(3).

Bottom summary: Use return when later code needs a result. Use print to display something. A function can do both, but they are different actions.

Make the cue column useful

After class, cover the main notes and answer the questions. If you cannot explain one cue without peeking, add a smaller example or an error you encountered. A cue like “What is a function?” is often too broad; “What does this function return for x = -2?” is easier to test.

Template to copy

  1. Write the lesson title and date.
  2. Put one runnable example and its expected result in the notes area.
  3. Write two “why/how” cues and one prediction question.
  4. End with a three-sentence summary and the next practice task.

Draft your own version in the free note editor. For another tested code example, read the Python functions note.

Make this lesson yours

Copy the questions into a personal study note, work through the examples, and return to the parts you missed.

Try the free note editorBrowse free study tools

Keep learning