Challenge
Silent branch
status_light() returns None for Scrub because that branch sets a variable but never returns it. Predict the last line, find which statuses give None, make every path return, then write a function…
6 results
Challenge
status_light() returns None for Scrub because that branch sets a variable but never returns it. Predict the last line, find which statuses give None, make every path return, then write a function…
Challenge
…so CRITICAL can never run. Predict it, find the dead branch, fix the order, then write a four-level chain.
Challenge
Replace a nine-branch elif that maps planets and the Moon to surface gravity with a dict and one get() lookup, keeping the output exactly the same, then loop over the dict for a weight table.
Challenge
…loop, add 1 to the right one inside the WARN and CRITICAL branches, and print the summary after the loop, at the left edge.
Challenge
…"From 400" includes 400 itself, so use >= . Indent each branch's line by four spaces. A status line The console shows the sensor, the reading and the level on one line. Add sensor = "ENG-2" under the…
Challenge
…(TBD), Polaris Cargo 4 (Hold) Build a list in the else branch, then join it after the loop.