Challenge
Telemetry from CSV
…you loop, keep the hottest reading in degrees Celsius, unit C , in hottest , and print it after the readings: Hottest: ENG-1 455.2 C at 09:30:15 Compare float(row["value"]) , not the text: as strings…
Showing 11–20 of 25
Challenge
…you loop, keep the hottest reading in degrees Celsius, unit C , in hottest , and print it after the readings: Hottest: ENG-1 455.2 C at 09:30:15 Compare float(row["value"]) , not the text: as strings…
Challenge
…{"time": "09:30:05", "sensor": "ENG-2", "value": 412.5, "unit": "C"} . Leave the function as it is. Lines that aren't readings Add checks for the lines the parser must turn into None : an empty line…
Example
Docstrings describe what a function does. Good programming practice.
Example
The else block executes when if condition is not met. Two possible paths.
Challenge
…at the commas, and print the sensor, the value and the unit: ENG-2: 412.5 C TANK-1: 78.3 % CABIN: 101.2 kPa ENG-2: 415.0 C feed.splitlines() gives a list with one string per line. Inside the loop…
Challenge
…on one row: the time of day, the sensor, the value and the unit. 09:30:05 ENG-2 412.5 C 09:30:06 CAB-1 101.3 kPa 09:30:07 BAT-3 87.2 % feed.split("\n") splits the feed into its lines, and each line…
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
Extend the feed parser so continue skips blank lines and comment lines, then report damaged lines with too few fields instead of crashing, with a count of parsed and damaged lines.
Challenge
A small but complete data pipeline: read the telemetry CSV, reject rows with unknown sensors or broken values and say why, flag readings outside each sensor's limits, and save a JSON summary for the…
Article Mini projects
…is 18,397 Earth seconds long, divided into 10,000 base-6 units (that's 7,776 in decimal). Each Eridian "second" equals about 2.366 Earth seconds. Write a program that takes a number of Earth seconds…