Numbers and arithmetic
P40.text-and-numbers.01 · Audience: guest, language-pro, it-ml · Prerequisites: What an import line means
Take a scrap of paper and add the words in two documents — say 120 and 85 — then work out how many pages that fills. You already do this arithmetic; you just do it by hand. This module hands the same sums to Python, the calculator you already trust — one operation at a time.
ⓘ Concept: Python is the calculator you already trust
+ add and - subtract (and, next, * multiply and / divide). Adding two word counts on paper gives a whole number —120 + 85 is 205 — and Python agrees. You write the sum; Python works out the answer.Why it matters — Starting from the calculator a beginner already trusts removes the fear that code is a new kind of maths. It is the same maths — typed instead of written.
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 · ~4 minYour turn: write three small sums with +, * and
/ — the add, multiply and divide you just stepped through — then
press Run and watch Python answer.
Explorer rung — add, multiply and divide
Loading exercise…
Where next?
Later in Text & Numbers
Go up a level