← ACARA Digital Technologies Years 7–8

Order of operations with brackets

Brackets run first, so a + b is added before dividing by 2. Then * and /, then + and -. Operators on the same level go left to right. Without brackets, only b is divided by 2.

Understanding Order of operations with brackets in ACARA Digital Technologies Years 7–8

What it does: 3 * 4 is inside the innermost brackets so it runs first (12), then 2 + 12 = 14, then 14 * 5 = 70. b / 2 is worked out first and then a is added, so this is not the average of a and b. Same-level operators go left to right: 20 - 5 is 15, then 15 - 3 is 12. Not 5 - 3 first. Brackets run first, so a + b is worked out before the division by 2 happens.

Common mistakes: Without brackets, only english is divided by 2 because / runs before +. It should be (maths + english) / 2 so the marks are added first. Division happens before addition, so only c is divided by 3. Brackets are needed around a + b + c so the sum is divided: (a + b + c) / 3.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.

This module's key terms are also in a printable crossword (Modules 562–580) and word search (Modules 522–580).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
What does console.log(2 + 3 * 4) print?
2014
Matches
let avg = math + english / 2;
↓
There are no brackets, so only english is divided by 2 and then math is added. It should be (math + english) / 2.
Applying
Meanings
Term
(a + b) / 2
Meaning
Brackets run first, so a + b is added before dividing by 2. Then * and /, then + and -. Operators on the same level go left to right. Without brackets, only b is divided by 2.
Practice
let a = 80;
Testing
Gaps
let average = (a b) / 2;
Check Answer
Spots
2let english = 90;
3let avg = maths + english / 2;

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Peregrine Falcon' badge — Operator Ace, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. What does console.log(2 + 3 * 4) print?
A. 20
B. 14 ✓
* runs before +, so 3 * 4 is 12 first, then 2 + 12 is 14.
2. Which line correctly works out the average of a and b?
A. let avg = (a + b) / 2; ✓
B. let avg = a + b / 2;
Brackets make a + b run first. Without them, only b is divided by 2, then a is added.
3. If a = 6 and b = 10, what does a + b / 2 give?
A. 8
B. 11 ✓
Division runs first: 10 / 2 is 5, then 6 + 5 is 11. The average (8) needs brackets: (a + b) / 2.
4. What does console.log((2 + 3) * 4) print?
A. 20 ✓
B. 14
The brackets run first: 2 + 3 is 5, then 5 * 4 is 20.
5. What does 2 * (3 + (4 - 1)) give?
A. 12 ✓
B. 10
Work from the innermost brackets out: 4 - 1 is 3, then 3 + 3 is 6, then 2 * 6 is 12.

Match the Pairs

let avg = (a + b) / 2; → Adds a and b first because of the brackets, then divides the total by 2 to get the average.
let result = 20 - 6 - 4; → Works left to right because - is on the same level, so it does 20 - 6 = 14 and then 14 - 4 = 10.
Nested brackets: JavaScript works out the innermost brackets first, then works outwards. → let total = (2 + (3 * 4)) * 5;
Without brackets, * and / run before + and -, so only the last number is divided. → let avg = a + b / 2;
let avg = math + english / 2; → There are no brackets, so only english is divided by 2 and then math is added. It should be (math + english) / 2.
let answer = 10 + 2 * 3; // should be 36 → The * runs before the +, so the answer is 16, not 36. It needs brackets: (10 + 2) * 3.

Key Term

(a + b) / 2
Brackets run first, so a + b is added before dividing by 2. Then * and /, then + and -. Operators on the same level go left to right. Without brackets, only b is divided by 2.

Fill in the Blanks

1. let a = 6; let b = 10; let average = (a + b) / 2;
Hint: Type the operator that joins the two values together inside the brackets before the division happens.
2. console.log((4 + 6) / 2); // 5
Hint: Type the operator that divides the bracketed total to give the answer in the comment.
3. let result = 2 * ((3 + 5) - 1); // 14
Hint: Work from the inner brackets outwards. Type the number that makes the result match the comment.
4. let x = 20 / 5 * 2; // 8
Hint: Same-level operators run left to right. Type the operator on the same level as division that gives the comment's answer.
5. let mark = (90 + 72 + 84) / 3; // 82
Hint: Type the number of values being averaged, which is what the bracketed total is divided by.

Spot the Error

Question 1
A let maths = 80;
B let english = 90;
C let avg = maths + english / 2;
D console.log(avg);
Line C — Without brackets, only english is divided by 2 because / runs before +. It should be (maths + english) / 2 so the marks are added first.
Question 2
A let a = 6;
B let b = 9, c = 12;
C let avg = a + b + c / 3;
D console.log(avg);
Line C — Division happens before addition, so only c is divided by 3. Brackets are needed around a + b + c so the sum is divided: (a + b + c) / 3.
Question 3
A let c = 20;
B let f = c * 9 / (5 + 32);
C console.log(f);
Line B — The brackets make JavaScript add 5 + 32 first, then divide by 37. The formula needs c * 9 / 5 + 32, with no brackets, so the multiply and divide run before the add.
Question 4
A let price = 12;
B let total = price + 3 * 4;
C console.log(total);
Line B — Without brackets, 3 * 4 is worked out first, giving 24 instead of 60. Brackets are needed so price + 3 is added before multiplying: (price + 3) * 4.
Question 5
A let x = (2 + (3 * 4) * 2;
B console.log(x);
C console.log(x - 10);
Line A — The brackets are not paired. The outer opening bracket is never closed. It should be (2 + (3 * 4)) * 2, so the inner brackets run first, then the outer ones.

Student with a class code? Join your class →