Power operator ^

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

Power operator ^

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does Radius ^ 2 mean in Cambridge pseudocode?
A Radius multiplied by itself
B Radius multiplied by 2
2. Which line correctly works out the area of a circle?
A Answer ← Pi * Radius * 2
B Answer ← Pi * Radius ^ 2
3. If Side is 4, what is the value of Side ^ 3?
A 64
B 12
4. Which expression gives the square of Length?
A Length ^ 2
B Length ^ 3
5. In Answer ← Pi * Radius ^ 2, which part is worked out first?
A Pi * Radius
B Radius ^ 2

Match the Pairs

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

Left columnRight column
1Side ^ 3 ASquare ← Number ^ 2
2Area ← Pi * Radius ^ 2 BAnswer ← 3 * Radius ^ 2
3Square a number by raising it to the power 2 CRadius * 2 doubles the radius instead of squaring it. The power operator ^ is needed, so it should be Pi * Radius ^ 2.
4Power is worked out before multiplication, so only Radius is squared DThe bracket is opened but never closed, which is a syntax error. It should be Pi * Radius ^ 2 or Pi * (Radius ^ 2).
5Area ← Pi * Radius * 2 ESquares Radius first, then multiplies the result by Pi
6Answer ← Pi * (Radius ^ 2 FSide raised to the power 3, so Side * Side * Side (a cube)

Definitions

^

Fill in the Blanks

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

1.
Answer ← Pi * Radius _ 2
2.
Area ← Side ^ _
3.
Volume ← Side ^ _
4.
______ ← Pi * Radius ^ 2
5.
Side ← 4 Area ← Side ^ 2 OUTPUT ____

Spot the Error

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

Question 1
A Square ← 5 ** 2
B Cube ← 5 ^ 3
C OUTPUT Square, Cube
Question 2
A Area ← (3.14 * 4) ^ 2
B OUTPUT Area
C OUTPUT Area * 2
Question 3
A DECLARE Side : INTEGER
B INPUT Side
C Cube ← Side * 3
D OUTPUT Cube
Question 4
A CONSTANT Pi ← 3.14
B Radius ← 3
C Area ← Pi * 2 ^ Radius
D OUTPUT Area
Question 5
A Radius ← 2
B Area = 3.14 * Radius ^ 2
C OUTPUT Area

Answer Key

Power operator ^
Section A: Quick Questions
Q1
A — Radius multiplied by itself
Q2
B — Answer ← Pi * Radius ^ 2
Q3
A — 64
Q4
A — Length ^ 2
Q5
B — Radius ^ 2
Section B: Match the Pairs
Q1
Side ^ 3 → Side raised to the power 3, so Side * Side * Side (a cube)
Q2
Area ← Pi * Radius ^ 2 → Squares Radius first, then multiplies the result by Pi
Q3
Square a number by raising it to the power 2 → Square ← Number ^ 2
Q4
Power is worked out before multiplication, so only Radius is squared → Answer ← 3 * Radius ^ 2
Q5
Area ← Pi * Radius * 2 → Radius * 2 doubles the radius instead of squaring it. The power operator ^ is needed, so it should be Pi * Radius ^ 2.
Q6
Answer ← Pi * (Radius ^ 2 → The bracket is opened but never closed, which is a syntax error. It should be Pi * Radius ^ 2 or Pi * (Radius ^ 2).
Section C: Definitions
Q1
^ — The power operator. Radius ^ 2 raises Radius to the power 2, meaning Radius * Radius. It is worked out before multiplication, so Pi * Radius ^ 2 squares Radius first.
Section D: Fill in the Blanks
Q1
Answer ← Pi * Radius ^ 2
Q2
Area ← Side ^ 2
Q3
Volume ← Side ^ 3
Q4
Answer ← Pi * Radius ^ 2
Q5
Side ← 4 Area ← Side ^ 2 OUTPUT Area
Section E: Spot the Error
Q1
A — Cambridge pseudocode uses ^ for powers, not **. The line should be Square ← 5 ^ 2.
Q2
A — The brackets make the multiplication happen first, so 12.56 is squared. Without them, only 4 is squared before multiplying by 3.14: Area ← 3.14 * 4 ^ 2.
Q3
C — Side * 3 only triples the side. To cube it you raise it to the power 3: Cube ← Side ^ 3.
Q4
C — The base and the power are swapped. This raises 2 to the power Radius. It should be Pi * Radius ^ 2, which squares Radius.
Q5
B — Assignment must use the ← operator, not =. The line should be Area ← 3.14 * Radius ^ 2.