Challenge
Safe number input
…try , break when it works, and except ValueError: for the message. The check doesn't show the question itself, only what the program prints. Only positive lengths A burn of 0 or -5 seconds converts…
Showing 11–17 of 17
Challenge
…try , break when it works, and except ValueError: for the message. The check doesn't show the question itself, only what the program prints. Only positive lengths A burn of 0 or -5 seconds converts…
Challenge
…are typed, reject everything else clearly, then make the error messages helpful. Three commands Ask for a command with input() . Accept start , stop and status in any case and with spaces around them…
Challenge
…saved setting, in the order it was saved, and collect a message for each problem: an unknown name, a number setting that is not a number or is outside its range in RANGES , a safe_mode that is not…
Challenge
A bare log message often isn't enough to diagnose a problem: which valve, at what pressure, on which orbit? Every subsystem wants to attach different details, and nobody wants a format_log() with…
Challenge
…multi-line mission log with count(), fix the count when a message mentions WARN itself, then summarise the log by level.
Challenge
…own ValueError : catch it and raise yours, with a clearer message. set mode and abort Two more commands: set mode X , where X is one of MODES , returns ("set", "mode", X) , and abort , with no values…
Challenge
…tools filter them by level, and alarms go off when an ERROR line appears. That only works if every line has exactly the same shape: [T+00:12:05] INFO Engines nominal The time since launch in square…