All posts

Ben learns Python: our series on TikTok and Instagram

Since 10 November a series of short episodes has been running on TikTok and Instagram. Ben, in his first semester of computer science, builds a grade calculator in Python and makes the mistakes everyone makes at the start. Margaret helps him the way the tutor in MargaretAI Learning helps: with a question instead of the answer.

What the series is about

The series is called "Ben's grade calculator": 30 episodes, one a day, each between 20 and 35 seconds long. Every episode takes on one thing in Python that you really need when you learn to program, for example that input() always gives you text, even when you type a number.

Ben's project grows along the way. First it works out an average, then tests arrive, later modules, a file to save to and a planner that tells him which grade he still needs. If you look closely you will find Byte in every episode, a small ladybird that hides somewhere and shows up whenever something goes wrong.

  1. Bug

    The terminal shows something other than what Ben expected.

  2. Question

    Ben wants the answer. Margaret asks him the one question that matters.

  3. Insight

    Ben sees what happened and changes the line himself.

  4. Takeaway

    A card with the rule to keep, then the code runs.

How an episode goes, in about half a minute.

Why Margaret never gives the answer

That is the joke that runs through every episode, and it is also what the tutor in MargaretAI Learning promises. If you are handed the finished answer, you end up with a line of code and no understanding. Margaret explains the why in a sentence or two, or answers with a question, and Ben changes his code himself.

In the product, ordinary code checks every answer of the tutor before you see it and discards it if it contains the reference solution. In the series, Margaret's lines are written by hand, not produced by the real tutor, but they follow the same rules. The code is real: it is filmed in VS Code, and every piece of it runs exactly as it appears in the video.

Where to find the episodes

The episodes appear on TikTok and on Instagram, both as MargaretAI Learning. Follow along and you get a new one every day until the finale on 9 December. And if you have spotted Byte, say so in the comments.

The buttons below lead to TikTok and Instagram. This page embeds nothing from either and loads nothing from them. Only when you follow a link are you on their sites, and there their privacy rules apply.