Curriculum

Curriculum

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.

Selected choicePick a choice below
Result—

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?

Reveal the explanation
  1. score = 75 compared with >= 70 vs > 70

    Both return true (Pass); above the cutoff they behave identically

  2. 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

  3. 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

An attendance checker states: 'To earn a certificate, attendance must be at least 80%.' Which condition matches this rule?
Show the answer and reasoning

Correct answer attendance >= 80

'At least 80%' includes 80% itself as passing, so >= 80 is required.