Challenge
Names with values
Print each sensor name with its reading by looping over two 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…
Showing 41–50 of 202
Challenge
Print each sensor name with its reading by looping over two 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…
Challenge
Go through a block of telemetry line by line with splitlines(), split each line at the commas and print the sensor and value, then unpack the four fields and show the clock time too.
Challenge
…in any case with an if/elif chain, print Unknown command for anything else, then handle empty input and show what was typed.
Challenge
…mode safe into tuples and raises ValueError with a reason for anything malformed, then run a whole batch of commands and report each one.
Challenge
The logistics team typed the manifest for the next supply flight by hand, and the loading crew won't touch a crate until every line checks out. Last time, a typo in a mass sent a 61 kg battery pack to…
Challenge
…outside each sensor's limits, and save a JSON summary for the dashboard.
Challenge
Write assert checks for mean(): an ordinary list and a list with one value first, then the edge cases, an empty list that should give None and lists with negative values, so broken copies of the…
Challenge
…which returns the record dict, then let it return None for blank, comment and damaged lines so the loop only keeps real records.
Challenge
Print the roster A–Z for a report with sorted() while the sign-up order stays exactly as it was, then sort names like de Vries and van Dijk correctly with key=str.lower.
Challenge
…the exact boundaries, then store the level in a variable for a status line.