THE INVESTIGATION
Include interval endpoints
Given numbers low, high, and value, with low <= high, return true if value lies in the closed interval [low, high].
Forecast evaluation
What’s going wrong
Original short debugging exercise. Given numbers low, high, and value, with low <= high, return true if value lies in the closed interval [low, high]. Read one JSON value from standard input and print the result as JSON. Inputs follow the stated contract. Repair the function and run the checks.
Expected behavior
Given numbers low, high, and value, with low <= high, return true if value lies in the closed interval [low, high].
Reproduction
01 Reproduction
{"low": 1, "high": 3, "value": 1}true
02 Control
{"low": 1, "high": 3, "value": 2}true
Before you begin
- Basic Python expressions
Need a nudge?
Reveal one investigation hint at a time. Try each clue before opening the next.
The bug is intentional. Run the starter code to see it fail, then work toward a fix. Difficulty is provisional.
Ready when you are
Every fix starts with a failing test.
Read the report, then sign in to start your investigation.