Tally the words in a text
P42.from-paper-to-notebook.01 · Audience: guest, language-pro, it-ml · Prerequisites: Choosing with if
Here is a task you have almost certainly done by hand: go through a text and count how often each word appears. On paper you add a gate mark under each word and count the marks at the end — slow, and one missed mark spoils the count. This is the capstone of the discipline: everything you have learned, turned on a real job. This first module does the word tally — a loop and a dictionary, working together.
ⓘ Concept: Counting by hand does not scale
Why it matters — Seeing the manual task clearly is what makes the notebook version feel worth learning: you are automating something you already know how to do.
Ask the mentor about this module
Ask a question about this content. The mentor explains and grounds its answer in what you are studying; asking is recorded as a learning signal, not a grade.
🎓 Practice ladder
1 graded rung · ~7 minYour turn: fill in the loop so the dictionary tallies every word in the text. The frequency table is built for you. Press Run.
Explorer rung — tally the words
Loading exercise…
Where next?
Later in From Paper to Notebook