# Chapter 7: Comparisons & Boundary Checks > Use <, =, and > operators accurately, including edge cases where two numbers are exactly equal. Chapter 7: Comparisons & Boundary Checks — Scratch Daizen English Textbook. Use <, =, and > operators accurately, including edge cases where two numbers are exactly equal. ## Lesson goal & core concept Prevent off-by-one bugs in score goals, borders, and timers. Remember that "10 > 10" is false and "10 < 10" is false. Always test what happens right on the boundary number. ## Step-by-step practice Work through these steps in the Scratch editor, predicting each result before clicking the green flag. - Test whether a sprite crossed the right edge with <(x position) > (220)>. - Trigger victory when <(score) > (9)> for 10+ integer points. - Use <(hp) < (1)> instead of <(hp) = (0)> in case HP drops below zero. - Test boundary values (9, 10, 11) deliberately. **Chapter 7: Comparisons & Boundary Checks — Example** - When green flag clicked - Forever - If <(x position) > (200)> then - Say (Finish line!) Try it: Announces the finish line as soon as x passes 200. ## Mini challenge & next steps Build a boundary guard that stops a sprite from walking past x = 210 or x = -210. - [Scratch Learning Textbook Home](/en/textbook/): Return to the full 4-stage curriculum overview. - [Scratch Block Dictionary](/en/dictionary/): Look up any block used in this chapter. Updated: 2026-11-24 Author: [Takamasa Suzuki](https://scratch.gmnavi.jp/about/author/) Japanese Edition: https://scratch.gmnavi.jp/textbook/ch07-comparison/ [Scratch Daizen (English)](https://scratch.gmnavi.jp/en/)