Challenge
Check every reading
…Make it check every temperature in temperatures_c and print each one with its level: 398.0 °C: OK 412.5 °C: WARN 455.2 °C: CRITICAL 401.7 °C: WARN 450.0 °C: CRITICAL 399.9 °C: OK Replace the line…
Showing 91–100 of 150
Challenge
…Make it check every temperature in temperatures_c and print each one with its level: 398.0 °C: OK 412.5 °C: WARN 455.2 °C: CRITICAL 401.7 °C: WARN 450.0 °C: CRITICAL 399.9 °C: OK Replace the line…
Challenge
…in the log, one per line, and the WARN entries, then print: Entries: 6 Warnings: 3 log.count("WARN") counts how many times the text appears. A multi-line string has a new line character, "\n"…
Challenge
…after a tidy-up. Python didn't just give up, though: it printed a traceback, a short report of where the program was when it failed. Read it, note what it tells you, and fix the bug exactly where it…
Challenge
…":00" . The first error Find the first ERROR entry and print its time, subsystem and message, or No ERROR entries when there are none: First ERROR: 10:14:47 PROP Fuel valve 2 not responding Stop the…
Challenge
…and median() , add import statistics at the top, and print the same two lines with statistics.mean() and statistics.median() : Mean: 418.8 C Median: 413.8 C The output doesn't change: that is the…
Challenge
…with a message that shows the value, so the calls below it print: 500.0 Refused: burn length can't be negative: -5 s Write raise ValueError(f"burn length can't be negative: {burn_s} s") inside an if…
Challenge
…out, and return the refusal when it isn't true. The calls print: ABORT: Cabin pressure falling Abort refused: pass confirm=True With the * in place, abort("Test", True) stops with a TypeError , and so…
Challenge
…occupied Docking lights off Add the call at the bottom: print(can_dock(0.05, 1.0, True, True, lights_on=False)) .
Challenge
…weighs 342 N A body that isn't in the table still prints the no-data line: GRAVITY_M_S2.get(body) gives None for a missing key, just like the old else . The whole table The table can do what the chain…
Challenge
…result from the list, attempt 2 the second, and so on. Print each attempt, stop at the first "ok" , then say how it ended: Attempt 1: timeout Attempt 2: no carrier Attempt 3: ok Uplink sent on attempt…