Variables — naming things
P40.text-and-numbers.04 · Audience: Guest, Language professional, IT/ML learner · Prerequisites: True / false and simple comparisons
Where next?
Go up a level
P40.text-and-numbers.04 · Audience: Guest, Language professional, IT/ML learner · Prerequisites: True / false and simple comparisons
Go up a level
You have already been using names — word, first, tally — without anyone
calling them what they are. On a quote sheet you write "rate" once and reuse it
down the column. This module names that habit: the variable — built up one
idea at a time.
x = 5 reads as "let the name x stand for 5". A good name (word_count) tells you what the value is; a bare x tells you nothing. You have already been reading names like first and word — now you know what they are called.Why it matters — Naming values is what makes code readable — a good name says what a value is — and it is the habit every later line depends on.
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.
Off by default. The mentor always gets your file; this only decides whether your own copy stays here. Copies live in this browser only - they do not follow you to another device, and clearing site data removes them.
Your turn: price a translation job — name the word count, then reuse both the rate and the count (no retyping numbers) for a normal fee and a double-size rush fee. Press Run.
Loading exercise…
Loading your notes...