Level 3

Mod and Round

Level 3 · Chapter 13

What this lesson follows

CSTA K–12 Computer Science Standards (2017)

Algorithms & Programming · Grades 3–5

Use events, loops and if-then in one program.

Code 1B-AP-10Read the official text

Also practised: 1B-AP-15

Common Core State Standards for Mathematics

Operations & Algebraic Thinking · Grade 4

Find factors and multiples.

Code 4.OA.B.4Read the official text

The short lines are our own words. We matched this lesson to these standards ourselves; the standards' owners have not reviewed or endorsed this course.

Common Core State Standards © 2010 National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

Today you will use mod and round to work with numbers precisely.

1👋 Warm-Up

For teachers · goals · guide
Lesson Outcomes · for teachersCSTA 1B
✦ CSTA 1B-AP-10 · CSTA 1B-AP-15 · ISTE 1.5.a · Standards
🎯 I canuse mod and round to work with numbers precisely
🧩 New blocks2 blocks
📝 New words6 words
⏱ Lesson time~40 min
Teacher Guide

📋 Before class

⚠️ Common misconceptions

  • Students may confuse mod with division. Clarify: division gives the quotient, mod gives the REMAINDER.
  • Students may expect round(3.5) to always go up — mention it goes to the nearest even number in some languages, but Scratch rounds .5 up.

🎯 Differentiation

🐢 Struggling: Draw a long division example on the board: 10 ÷ 3 = 3 remainder 1. Circle the remainder. That circled number is what mod returns.

🚀 Advanced: Challenge: use mod to flash a message every 3rd second using the timer. if <((round (timer)) mod (3)) = (0)> then say [3 seconds!]

💡 During the lesson

  • Warm-UpWrite on the board: "10 ÷ 3 = 3 remainder 1." Draw three groups of three dots, then circle the one dot left alone. Say: "That lonely dot is the remainder — and mod gives you that number." Draw the dots on the board: 7 makes 3 pairs with 1 dot left over (odd); 8 makes 4 pairs with 0 left over (even). Then connect: 7 mod 2 = 1, 8 mod 2 = 0.
    Point to the mod card. Ask students: "What number is left over when we split 7 into pairs?" (1.) "What about 8?" (0, perfect pairs.) Draw pairs of dots on the board to confirm visually before touching Scratch.
  • Try ItPoint at each block. mod answers "what is left over?" round answers "what is the closest whole number?" Have students read each block aloud before they build.
    Have students predict before running each version. Ask: "What did the new number change in each Try?" Connect to the even/odd algorithm — mod 2 gives 0 or 1, round gives a whole number.
  • PlanAsk: "Why do we check mod AFTER setting the score?" (We need a value in the variable first.) Then ask: "What would happen if score = 0? Is 0 even or odd?" (0 mod 2 = 0, so 0 is even.) Students are often surprised.
  • BuildStep 3 is the trickiest — students must build the condition (score) mod (2) = (0) by nesting operator blocks. Show the nesting live: drag mod into the left hole of equals, then drag equals into the if hexagon. Walk the room at this step.