Challenge
Missing field
…the API hasn't assigned a pad yet. Predict it, check the keys with in, fix it with get() and a default, then print a list of launches with defaults for any missing field.
10 results
Challenge
…the API hasn't assigned a pad yet. Predict it, check the keys with in, fix it with get() and a default, then print a list of launches with defaults for any missing field.
Challenge
The monitoring system raises the same alert over and over. Group repeats of an alert that come within 60 seconds of the first into one line with a count, in the order they first appeared, then add the…
Challenge
Write convert(), which looks a unit pair up in a table of factors, works the other way round by dividing, and refuses unknown units or missing pairs with a clear ValueError, then extend the table with…
Challenge
Print the name, provider and status of a launch from a dict shaped like a launch-API response, then list every field the response has with items(), the way you'd inspect an API you haven't used…
Challenge
Extend the feed parser so it stores every reading as a dict with time, sensor, value and unit in a list of records, then let other code pick out one sensor's readings by key.
Challenge
…keep the station's Polish letters readable and sort the keys so the files compare easily.
Challenge
…they haven't changed falls back, then warn about unknown keys instead of saving them.
Challenge
…patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.
Challenge
…with csv.DictWriter : a header row with the four keys, then one row per subsystem. After the report, print an empty line, the saved line, and the file as it was written: Saved report.csv…
Challenge
…Write summarise(readings) , which returns a dict with the keys count , min , max and mean . Then print(summarise(pass_1)) prints: {'count': 5, 'min': 398.0, 'max': 455.2, 'mean': 419.5} Build the dict…