Results for “python conditions”

Showing 1–10 of 18

  1. Challenge

    Unreachable branch

    …check reports WARN for a reading of 63 because its elif conditions are in the wrong order, so CRITICAL can never run. Predict it, find the dead branch, fix the order, then write a four-level chain.

    Fix the code Easy 3 stages if elif order of conditions debugging
  2. Challenge

    Launch commit criteria

    …GO. With today's reports: Launch: GO Join the three conditions with and . lightning is True or False, so not lightning means "no lightning". "Under 30" means 30 itself is too much. Why it's on hold…

    Write the code Easy 2 stages if else and not
  3. Challenge

    Flatten nested ifs

    …a docking check built from three nested ifs into one condition joined with and, keeping the output exactly the same, then rewrite it as a flat if/elif chain that reports the first check that failed.

    Fix the code Medium 2 stages if elif and nested conditions
  4. Challenge

    Assignment in a condition

    An oxygen check uses = instead of == and has a line that isn't indented, so Python refuses to run it. Predict what happens, fix both errors one after the other, then write an if/else check yourself.

    Fix the code Easy 3 stages if else == SyntaxError
  5. Challenge

    Safe mode

    …With the battery at 18%: Safe mode: ON Join the two conditions with or . "Under 20" and "over 10" don't include 20 and 10 themselves. Which rule fired The ground team needs to know why. Store each…

    Write the code Medium 2 stages if elif or and