Choose Between At Least (>=) and More Than (>)
Scenario
A classroom quiz scorer applies two rules: Rule 1 says 'Students need at least 70 points to pass.' Rule 2 says 'Students need more than 90 points to earn an honors star.' Both rules meet at exact cutoff scores.
Try it yourself
If a student scores 70 on the quiz, do they pass under >= 70 vs > 70? And does a score of 90 earn the honors star under > 90?
| Case | Result |
|---|---|
| score = 75 compared with >= 70 vs > 70 | Select a choice above to see what happens. |
| score = 70 compared with >= 70 vs > 70; and score = 90 compared with > 90 vs >= 90 | Select a choice above to see what happens. |
| score = -5 (outside valid 0..100 quiz range) with >= 70 | Select a choice above to see what happens. |
Reveal the explanation
- score = 75 compared with >= 70 vs > 70
Both return true (Pass); above the cutoff they behave identically
- score = 70 compared with >= 70 vs > 70; and score = 90 compared with > 90 vs >= 90
score=70: >= 70 is true (Pass), > 70 is false; score=90: > 90 is false (No Star), >= 90 is true
- score = -5 (outside valid 0..100 quiz range) with >= 70
The validator rejects the negative score before comparing it. A valid score of 69 falls below both cutoffs.
Test every threshold rule with the exact cutoff number first. Read the wording carefully: if reaching the exact number qualifies ('at least 70', 'at most 5 books'), use >= or <=; if you must beat the exact number ('more than 90', 'fewer than 5'), use > or <.
Download shared test cases
Your turn
A library rule states: 'A student may borrow up to 4 books at once, and gets a reminder if overdueDays is more than 3.' Write the exact operator and boundary result for books = 4 and overdueDays = 3.
Common mistake Using < 4 instead of <= 4 for 'up to 4', or >= 3 instead of > 3 for 'more than 3'.
Check your work
books <= 4 gives true at books = 4 (allowed); overdueDays > 3 gives false at overdueDays = 3 (no reminder yet).
Quick check
This browser could not save your progress. Changes last until you leave the page.