Challenge
Telemetry from CSV
…a proper export, telemetry.csv , with a header row, and it changes every few seconds. Read the file itself, with the module made for it, then pick out the hottest reading. csv.DictReader Replace the…
Showing 101–110 of 150
Challenge
…a proper export, telemetry.csv , with a header row, and it changes every few seconds. Read the file itself, with the module made for it, then pick out the hottest reading. csv.DictReader Replace the…
Challenge
…raises the wrong error fails it, then pin down the message and the lengths that must still work.
Challenge
…Read it from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.
Challenge
The burn length is typed in by hand, and a typo stops the program with a ValueError. Catch it with try and except, keep asking until the input is a number, then also turn away zero and negative…
Challenge
Extend the feed parser from "Skip blanks and comments": a faulty sensor sends ERR and float() stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too…
Challenge
…fixed? Six months from now someone will tidy the function, and log=[] looks so much simpler than the None check. Write the test that proves the fix: it has to pass now and fail on the old code. The…
Challenge
…level first, then the values exactly on each threshold and just below them, so a > written instead of >= can't slip through.
Challenge
…tank-status blocks with a list of (name, level) pairs and one loop, keeping the output exactly the same, then add a fourth tank with a single list item and list the low tanks.
Challenge
…lists together with zip(), then add a third list of units and warn when the lists don't have the same length, since zip() quietly stops at the shortest.
Challenge
…driver hands your alert check None instead of a number, and the check from "Alert level" stops with a TypeError in the middle of a pass. Extend your check so a missing reading is reported, not crashed…