Quality Gate
A easy Python interview practice problem on DataDriven. Write and execute real python code with instant grading.
- Domain
- Python
- Difficulty
- easy
- Seniority
- L3
Problem
A sensor rig streams a batch of `readings`, and quality control needs the position of the first reading that slips out of spec, where in spec means strictly above zero. Return that index, or -1 when every reading passes and when the batch is empty.
Summary
Not everything passes inspection.
Practice This Problem
Solve this Python problem with real code execution. DataDriven runs your Python code in a real environment and grades it automatically.