Search RU
Tasks / pytest / Fix the filter boundary
Statement easy

Fix the filter boundary

In `starter.py` the price filter uses a strict `<` and does not validate a
negative `max_price`.

Fix it:

- an item priced exactly `max_price` must be included;
- a negative `max_price` is a `ValueError`.

pytestboundarydebugging
solution.py Python 3.14
AI mentor

The AI mentor is available after you log in: it sees your attempt history and does not spend resources on anonymous requests.

Log in and ask
Hints 1 of 3 unlocked · attempts: 0
Hint 1

Compare `<` and `<=` on an item priced exactly `max_price`. What should happen
with a negative limit?

Hint 2 — unlocks after 1 attempt
Hint 3 — unlocks after 3 attempts