AP CSP CodeX - Types of Division
Types of Division
Students compare decimal, integer, and modulo division, then use modulo division to keep a list index in range in a CodeX program.
Overview
This lesson gives a quick overview of integer (or floor) division and modulo division. It is not a requirement for the Create PT, but there are questions on the AP Exam that cover this material. Most of the lesson is unplugged, but in one activity students use modulo division in a program they have already written.
🎯 Mission Goal: Students will learn about different types of division, including integer (floor) division and modulo.
Learning Targets
- I can evaluate expressions that use decimal division, integer division, and modulo division.
- I can determine the possible answers for modulo.
- I can give applications for using modulo division.
- I can use modulo division in a program.
Key Concepts
- Real number, or decimal, division gives a decimal answer.
- Integer division is the whole number only of a division problem, or the number of times the divisor goes into the dividend.
- Modulo division is the integer remainder of long division.
Assessment Opportunities
- Types of Division Activity Guide
- Billboard_modulo program
Success Criteria
- Evaluate expressions with decimal, integer, and modulo division
- Determine possible answers for modulo division
- Give applications for using modulo division
- Use modulo division in a program
Digital Resources
Classroom Materials
- ▸CodeX
- ▸USB-C cable
- ▸Computer
Real-World Applications
Extensions & Cross-Curricular
choice % len(my_list)).
% to tell whether a number is even or odd, then explain why number % 2 can only be 0 or 1.
//) and the remainder is 3 (%). Students check that quotient x divisor + remainder = dividend for each problem in the lesson.
(3 + 14) % 12 and explain what a result of 0 means on a clock.
13 // 5 and 13 % 5).
🔤
Vocabulary
▾
🐍
New Python Code
▾
num.
num, returns the integer.
📐
Standards
▾
CSTA Standards - Grades 9-10
CSTA Standards - Grades 11-12
AP CSP Framework
- The activity guide is best completed digitally. Prepare the activity guide to give through your LMS.
- Have white boards ready for random groups of three. If you want groups to work on paper, print the problem sets from the Teaching Guide and Problem Sets for Printing document.
- If you have a word wall, or another form of vocabulary presentation, prepare the new terms.
- This lesson is best with partners or in groups of three. I recommend random groups and having students work at white boards for this activity. You can print the problems and have students work on them, which will enable them to discuss their thinking and check their answers with other groups.
- Modulo division isn't expressly used in the CodeX missions, but it is covered in the AP curriculum. This is a good time to pause on programming a mission and cover some AP material. Students will use this in Mission 9.
- Go through the slides first. The Teaching Guide and Problem Sets for Printing includes step-by-step instructions for guiding this lesson as a whole-class with random groups of three.
- The third part of the lesson has students modify a program in CodeSpace. Remember to use the sandbox, and have students rename the program. A code solution for the program is available.
- After all four parts of the lesson, give the activity guide for students to complete as the wrap-up or check for understanding.
Lesson Outline
This outline gives the narration for one way to present the lesson. The narration and step-by-step instructions are also in the Teaching Guide and Problem Sets for Printing document.
Randomly group students in groups of three and have them work at vertical non-permanent surfaces (white boards).
Part 1 is exploratory. Students are given math problems with an answer, and they need to determine the operator to get the answer. The first problem is decimal division. The second problem is integer division. They will not know the operator for this, but they should be able to determine that it is integer division, or the number of times the divisor goes into the dividend evenly (no remainder).
//) for integer division.Continue the random groups at the white boards. Students should NOT erase their boards, but add to the problems.
Part 2 is also exploratory. Students are given another math problem with an answer, and they need to determine the operator to get the answer. This one is modulo division (the remainder). They will not know the operator for this, but they should be able to determine that it is the remainder. Hopefully getting through Part 1 will help trigger their brains to come up with the remainder.
%).Students get into CodeSpace and modify a program they previously completed. Students can work individually or in pairs for this part.
- Limits the number of possible answers
- Separates place values of numbers
- Is used for numerical conversions
- Gives you leftovers
✅ The Billboard_modulo program is complete and runs as expected.
Return to the random groups at the white boards. Students can erase their boards, or leave their math problems. Either way works fine.
Part 4 gives you and the students a chance to gauge their understanding of the different types of division. Students complete it in their groups, kind of like note-making. The best way for students to check their work is to look at other groups, compare answers, and discuss. Then they rework problems they are not sure about. If time is short, use the slides to show the answers.
number % 10, number % 5, and number % 3.10 // 7 and 10 % 7.4 // 5 and 4 % 5.Use the activity guide as a review of the concepts worked on during the lesson. Students can work individually, with a partner, or even at the white boards (if you print the activity guide). If time permits, go over the answers, or have students check with each other on their answers.
✅ The activity guide is complete and ready to turn in.
Formative assessment:
- Types of Division Kahoot! Review (5 questions)
- Daily reflection journal or Google Form
- Class discussion on what they learned about types of division
- Assignment completion
- Exit ticket