Addition, subtraction, multiplication and division operators

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Addition, subtraction, multiplication and division operators

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which symbol multiplies two numbers in Cambridge pseudocode?
A x
B *
2. Which symbol divides one number by another in Cambridge pseudocode?
A /
B ÷
3. Which line correctly stores the total of Price and Tax in Total?
A Total ← Price + Tax
B Price + Tax ← Total
4. Score is 45 and MaxMark is 60. What does Answer ← Score * 100 / MaxMark store in Answer?
A 75
B 2700
5. Which line correctly multiplies Length by Width and stores the result in Area?
A Area ← Length Width
B Area ← Length * Width

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Total ← Price * Quantity AMultiplies Price by Quantity and stores the result in Total
2Average ← Sum / Count BDivides Sum by Count and stores the result in Average
3Work out a percentage by multiplying the score by 100, then dividing by the maximum mark, and storing it in a variable CThe letter x is not a multiplication operator in pseudocode. Use * instead: Area ← Length * Width
4Add two numbers together and store the result in a variable DThe result must be stored on the left of the ← operator, with the expression on the right: NewScore ← Score + 5
5Area ← Length x Width ETotal ← Mark1 + Mark2
6Score + 5 ← NewScore FAnswer ← Score * 100 / MaxMark

Definitions

+ - * /

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Answer ← Score _ 100 / MaxMark
2.
Answer ← Score * 100 _ MaxMark
3.
Total ← Price _ Tax
4.
Change ← Paid _ Cost
5.
Answer _ Score * 100 / MaxMark

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Price ← 5
B Total ← Price x 3
C OUTPUT Total
Question 2
A Score ← 45
B MaxMark = 60
C Answer ← Score * 100 / MaxMark
D OUTPUT Answer
Question 3
A Cost ← 12 & 8
B Change ← 20 - Cost
C OUTPUT Change
Question 4
A Width ← 6
B Height ← 4
C Area ← Width + Height
D OUTPUT Area
Question 5
A Total ← 90
B Count ← 3
C Mean ← Total / Count
D Double ← 2 Mean
E OUTPUT Double

Answer Key

Addition, subtraction, multiplication and division operators
Section A: Quick Questions
Q1
B — *
Q2
A — /
Q3
A — Total ← Price + Tax
Q4
A — 75
Q5
B — Area ← Length * Width
Section B: Match the Pairs
Q1
Total ← Price * Quantity → Multiplies Price by Quantity and stores the result in Total
Q2
Average ← Sum / Count → Divides Sum by Count and stores the result in Average
Q3
Work out a percentage by multiplying the score by 100, then dividing by the maximum mark, and storing it in a variable → Answer ← Score * 100 / MaxMark
Q4
Add two numbers together and store the result in a variable → Total ← Mark1 + Mark2
Q5
Area ← Length x Width → The letter x is not a multiplication operator in pseudocode. Use * instead: Area ← Length * Width
Q6
Score + 5 ← NewScore → The result must be stored on the left of the ← operator, with the expression on the right: NewScore ← Score + 5
Section C: Definitions
Q1
+ - * / — The arithmetic operators in pseudocode: + adds, - subtracts, * multiplies and / divides. Example: Answer ← Score * 100 / MaxMark stores the result in a variable.
Section D: Fill in the Blanks
Q1
Answer ← Score * 100 / MaxMark
Q2
Answer ← Score * 100 / MaxMark
Q3
Total ← Price + Tax
Q4
Change ← Paid - Cost
Q5
Answer ← Score * 100 / MaxMark
Section E: Spot the Error
Q1
B — The letter x is not a multiplication operator in pseudocode. Multiplication uses *, so the line should be Total ← Price * 3.
Q2
B — A value is stored in a variable with the assignment arrow ←, not =. The line should be MaxMark ← 60.
Q3
A — The & symbol does not add numbers. Addition uses +, so the line should be Cost ← 12 + 8.
Q4
C — Area is width multiplied by height, so the operator must be *, not +. The line should be Area ← Width * Height.
Q5
D — There is no operator between 2 and Mean. Multiplication must be written with *, so the line should be Double ← Mean * 2.