More Arithmetic: % and **, online
Six activities your students do on their own devices. See who's finished, and their scores.
Learning
Understanding
Testing
More Arithmetic: % and ** in one minute
What students need to know
This expression checks whether num is an even number. This raises 3 to the power of 3, or 3 * 3 * 3.
% gives you what's left over after dividing. ** performs exponentiation, like squaring or cubing a number.
Mistakes students make
- Use %, not the word mod, for the remainder operator.
- JavaScript uses ** for exponents, not ^.
- Remainder uses %, not //, in JavaScript.
- Exponents use **, not the word pow, in JavaScript.
PREVIOUS · MODULE 5Basic Arithmetic
YOU ARE HERE · MODULE 6More Arithmetic: % and **
NEXT · MODULE 7String Concatenation
What students will learn in this module
Every question in Module 6
Quick questions
- Does % return the remainder of a division?ANoBYes
- Does ** raise a number to a power?AYesBNo
- Is ^ used for exponents in JavaScript?ANoBYes
- Can % be used to check if a number is even?AYesBNo
- Is 'mod' a valid JavaScript operator for remainder?AYesBNo
Key terms
Students type the meaning of:
%
Match the pairs
10 % 3Match it to what it does2 ** 4Match it to what it doesChecks if a number divides evenly with no remainderMatch it to what it doesMultiplies a number by itself repeatedlyMatch it to what it doesconsole.log(10 mod 3);Match it to what it doesconsole.log(2 ^ 4);Match it to what it doesFill in the blanks
console.log(10 _ 3);
Hint: Type the operator that returns the remainder of a division.
console.log(2 __ 4);
Hint: Type the operator that raises a number to a power.
let remainder = 7 _ 2;
Hint: Type the operator that returns the remainder of a division.
let cube = 3 __ 3;
Hint: Type the operator that raises a number to a power.
let isEven = num _ 2 === 0;
Hint: Type the operator that returns the remainder of a division.
Spot the error
Question 1
Aconsole.log(10 mod 3);Bconsole.log(10 % 3);Cconsole.log(2 ** 4);
Question 2
Aconsole.log(2 ^ 4);Bconsole.log(2 ** 4);Cconsole.log(10 % 3);
Question 3
Alet r = 9 % 4;Blet s = 9 // 4;Clet p = 2 ** 3;
Question 4
Alet x = 5 % 2;Blet w = 5 pow 2;Clet z = 5 ** 2;
Question 5
Alet a = 8 % 3;Blet b = 8 ** 2;Clet c = 8 %% 3;
