Command Palette

Search for a command to run...

Hectal
Phase 13: Interviews and Capstone
RAG and Vector Search · Exercise 4 of 5 PreviousNext
Advanced

Build the launch gate

Write gate(checks) where checks is a list of tuples (label, value, op, limit) and op is ">=" or "<=". Return the list of labels whose check fails, in order.

Write launch(checks) that returns "YES" when there are no failures and "NO" otherwise.

What Check tests

  1. A passing check is not reported
  2. A value below an at-least limit fails
  3. A value above an at-most limit fails
  4. Equal to the limit passes both directions
  5. Failures keep their order
  6. launch is YES or NO

Stuck? One hint at a time

The solution unlocks after your first Check. Try first: that is where the learning happens.

main.py
Sign in to run your code.

Output

Press Run to see what your program prints.