Challenge
Survive bad lines
…then let one try cover short lines too and print each error.
Showing 11–20 of 25
Challenge
…then let one try cover short lines too and print each error.
Article Mini projects
…HMAC authentication This version: - Uses HMAC for proper message authentication - Stores UTC timestamps for persistence across restarts - Uses monotonic time for in-session interval enforcement…
Challenge
…own parameter names. Then print(format_log(elapsed, level, message)) . One change for every line The function is now used for a whole orbit's entries, and ERROR is five letters long, so its messages…
Article Python Fundamentals
…required. Forgetting it is probably the most common syntax error in this whole topic. Everything indented under the def line is the body of the function. Python uses that indentation (four spaces is…
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…
Article Python Fundamentals
…runs exactly as you'd expect, with proper formatting and error messages that actually help. Charts and Graphics? Yes, Really Here's where it gets interesting. Need to test that pandas visualization?…
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.