DIV: whole-number quotient

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

DIV: whole-number quotient

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does DIV(10, 3) return?
A 3
B 3.33
2. Which statement describes DIV(a, b) correctly?
A Returns the whole-number part of a divided by b
B Returns the remainder of a divided by b
3. A coach has 20 players and puts 6 in each team. Which expression gives the number of full teams?
A DIV(20, 6)
B MOD(20, 6)
4. What does DIV(15, 5) return?
A 0
B 3
5. What does DIV(7, 10) return?
A 1
B 0

Match the Pairs

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

Left columnRight column
1DIV(10, 3) AGroups ← DIV(30, 4)
2DIV(125, 60) BDIV does not return decimals. DIV(10, 3) returns 3, not 3.33, because the fractional part is discarded.
3Store how many whole groups of 4 fit into 30 COUTPUT DIV(Minutes, 60)
4Output the whole hours in a number of minutes stored in Minutes DReturns 2, the number of whole hours in 125 minutes
5Result ← DIV(10, 3) OUTPUT Result // expects 3.33 EReturns 3, because 3 whole groups of 3 fit into 10 and the remainder is discarded
6Hours ← DIV(60, Minutes) FThe arguments are in the wrong order. To find whole hours, the minutes must be divided by 60, so it should be DIV(Minutes, 60).

Definitions

DIV(a, b)

Fill in the Blanks

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

1.
OUTPUT ___(10, 3)
2.
Hours ← DIV(150, __)
3.
DECLARE TotalMinutes : INTEGER Hours ← DIV(____________, 60)
4.
DECLARE Groups : _______ Groups ← DIV(17, 5)
5.
DECLARE Groups : INTEGER Groups _ DIV(10, 3) OUTPUT Groups

Spot the Error

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

Question 1
A Hours ← DIV(135 60)
B OUTPUT Hours
C OUTPUT "Whole hours"
Question 2
A DECLARE Groups : INTEGER
B Groups ← DIV(10, 3)
C OUTPUT "Groups of 3:"
D OUTPUT Group
Question 3
A Total ← 17
B Size ← 5
C Boxes ← MOD(Total, Size)
D OUTPUT Boxes
Question 4
A Total ← 25
B Size ← 4
C OUTPUT "Full rows:"
D OUTPUT DIV(Size, Total)
Question 5
A Answer ← DIV 10, 3
B OUTPUT Answer
C // Output is 3

Answer Key

DIV: whole-number quotient
Section A: Quick Questions
Q1
A — 3
Q2
A — Returns the whole-number part of a divided by b
Q3
A — DIV(20, 6)
Q4
B — 3
Q5
B — 0
Section B: Match the Pairs
Q1
DIV(10, 3) → Returns 3, because 3 whole groups of 3 fit into 10 and the remainder is discarded
Q2
DIV(125, 60) → Returns 2, the number of whole hours in 125 minutes
Q3
Store how many whole groups of 4 fit into 30 → Groups ← DIV(30, 4)
Q4
Output the whole hours in a number of minutes stored in Minutes → OUTPUT DIV(Minutes, 60)
Q5
Result ← DIV(10, 3) OUTPUT Result // expects 3.33 → DIV does not return decimals. DIV(10, 3) returns 3, not 3.33, because the fractional part is discarded.
Q6
Hours ← DIV(60, Minutes) → The arguments are in the wrong order. To find whole hours, the minutes must be divided by 60, so it should be DIV(Minutes, 60).
Section C: Definitions
Q1
DIV(a, b) — Divides a by b and returns only the whole number part, discarding any remainder. DIV(10, 3) returns 3, so it counts how many whole groups of 3 fit into 10.
Section D: Fill in the Blanks
Q1
OUTPUT DIV(10, 3)
Q2
Hours ← DIV(150, 60)
Q3
DECLARE TotalMinutes : INTEGER Hours ← DIV(TotalMinutes, 60)
Q4
DECLARE Groups : INTEGER Groups ← DIV(17, 5)
Q5
DECLARE Groups : INTEGER Groups ← DIV(10, 3) OUTPUT Groups
Section E: Spot the Error
Q1
A — DIV needs its two arguments separated by a comma. It should be DIV(135, 60), which returns 2.
Q2
D — The variable declared and assigned is Groups, not Group. The line should be OUTPUT Groups so it shows 3.
Q3
C — MOD gives the remainder (2), not the number of whole groups. To count whole boxes use DIV(Total, Size), which returns 3.
Q4
D — The arguments are the wrong way round. DIV(4, 25) returns 0. It should be DIV(Total, Size), which returns 6.
Q5
A — DIV is written like a function with brackets around its arguments. It should be Answer ← DIV(10, 3).