GCSE · Computer Science · AQA · Spec 8525
Multiplication (arithmetic operator)
In maths, 2n obviously means 2 times n. Type 2n into a program and the computer has no idea what you mean. One small symbol fixes it.
Computer Science · Arithmetic operators
Would the computer multiply this?
Pick a line, then decide: will the computer read it as a multiplication, or not?
Still to sort
Multiplies (0)
Doesn't multiply (0)
Where the line is: Ask yourself: is there an actual operator between the two values? If a human would have to 'just know' it means times, the computer won't.
Every line here is someone's attempt to multiply. You've written all of these in maths lessons — now test each habit against what code accepts.
Computer Science · Algorithms
Trace table — dry run the code
Painting four square walls, two coats each. The arrow ← means 'store the value on the right in the variable on the left'. Before you step, predict each new value.
Ready when you are — step through one line at a time.
Predict, then check
Does the computer work left to right, or does it follow an order rule?
A program runs the line: answer ← 2 + 3 * 4. What gets stored in answer?
WHAT YOU'VE LEARNED
A quick recap of today's lesson.
Maths lets you hide the times sign. Code needs to see it.
What you need to know
- Multiplication in pseudocode and in programming languages such as Python is written with the * operator (the asterisk).
- The * has to be written every time: code doesn't assume a multiplication, so 2n and 2(a + b) are errors, and ab is read as one variable name.
- × and the letter x are not operators in code.
- In an assignment like total ← price * quantity, the right-hand side is worked out first, then the result is stored in the variable on the left.
- * is done before +. Use brackets when you want the addition to happen first.
The big picture
In code, multiplication is written with the * operator, and it always has to be written: 2n, 2(a + b), ab, a × b and a x b don't multiply. In an assignment such as cost ← price * quantity, the right-hand side is worked out first and the result is stored in the variable on the left. * is done before + unless brackets change the order.
Key points
Worked example
Problem
A taxi firm's fare, in pounds, is C = 3 + 2d, where d is the distance in miles. Write this as a line of code that stores the fare in a variable called fare, then work out what is stored when distance holds 5.
⚠ Watch out
Writing multiplication the maths way: 2n instead of 2 * n, or 2(a + b) instead of 2 * (a + b). The computer won't fill in a missing *, and it reads ab as one variable called ab.
Memory hook
No star, no multiply. If you can't see the *, neither can the computer.
Check yourself
Rewrite y = 4x as a line of code, then say what is stored in y when x holds 3. (Answer: y ← 4 * x, which stores 12.)
Flashcards
(7)What symbol means multiply in code?
Why doesn't 2n work in code?
What does the computer make of ab?
How do you write 2(a + b) in code?
In total ← price * quantity, what happens first?
What does x ← x * 2 do?
Which goes first in code: * or +?
Tap any card to flip it, or use Study as deck to go through them one at a time. In the full lesson these run as a spaced-repetition deck — you rate each card Hard, Good or Easy and the tricky ones keep coming back until they stick.
Learning with Lightbulb is opening soon
You can use this lesson now. Join the waitlist and we'll let you know when the full Lightbulb experience is ready.
Keep me postedMore AQA GCSE Computer Science topics
How this lesson was checked. This AQA GCSE Computer Science (specification 8525)lesson was published through Lightbulb Learning's human-designed editorial process — the educational standards, accuracy rules and publication checks it must pass were authored and approved by Philip Halpin. It passed subject-specific assessment, automated educational checks and technical publication verification before going live (publication checks completed 30 September 2026). Published pages are monitored, human spot-checking is ongoing across the lesson library, and anything found wrong is corrected or withdrawn. How our lessons are made and checked. Spotted a mistake? Email hello@lightbulblearning.co and we'll review it.