Challenge
Check every reading
Extend the OK/WARN/CRITICAL check from Alert level so a for loop runs it over every temperature in a list, then count the WARN and CRITICAL readings for a summary line.
Showing 11–20 of 100
Challenge
Extend the OK/WARN/CRITICAL check from Alert level so a for loop runs it over every temperature in a list, then count the WARN and CRITICAL readings for a summary line.
Challenge
…or Malargüe from the longitude under a spacecraft with an if/elif chain of ranges, then accept longitudes from 0 to 360 and reject values that can't be longitudes.
Challenge
…name the rule that fired with boolean variables and an if/elif chain.
Challenge
…to images, telemetry or rejected by its extension with an if/elif chain and endswith(), then cope with capitals, spaces and more extensions without changing the name that is shown.
Challenge
…The config says "False". Follow it through bool() and the if . Investigate and modify Investigate. Find out what bool("False") and bool("") give and store the answers, True or False , in the two…
Challenge
…into the else , indented by four more spaces. Don't use if not temperature_c : 0 °C is a real reading. An empty field Readings now come from the telemetry feed, and a missing value shows up as an…
Challenge
A vibration 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…
Challenge
Print only the launches whose status is Go from a list of launch dicts, then collect the others with their status into one "not go yet" line, or none.
Challenge
…Expect the ValueError Write a check that passes only if fuel_needed(-5) raises ValueError : call it in try , set a variable to True in except ValueError: , and assert it after. Then print: All checks…
Challenge
Rewrite the four nested ifs in can_dock() as guard clauses that return a reason as soon as a check fails, keeping every answer the same, then add a new docking rule as one more guard with a default…