Challenge
JSON out
Turn the day's mission summary dict into JSON text with json.dumps() and indent=2, see what True, False and None become, then keep the station's Polish letters readable and sort the keys so the files…
9 results
Challenge
Turn the day's mission summary dict into JSON text with json.dumps() and indent=2, see what True, False and None become, then keep the station's Polish letters readable and sort the keys so the files…
Challenge
Print a JSON-style status message full of double quotes and an apostrophe exactly, then build it with an f-string that needs literal curly braces.
Challenge
…worked on a ready-made dict, but the API really sends JSON text. Turn it into a dict with json.loads(), see what false and null become, then handle a response cut off in transfer.
Challenge
Load the downlink module's JSON settings over a copy of the defaults, check each value's type and range and report every problem in one go, then wrap it all in a load_config() that never crashes, even…
Challenge
…flag readings outside each sensor's limits, and save a JSON summary for the dashboard.
Challenge
Parse the launch schedule from JSON, keep the launches still to come, sort them by their window and print a digest line for each with the time left and any hold, then switch the digest to the live…
Challenge
…has a web API. Ask it about a launch and it answers with JSON, which Python's json module turns into a dict in one line. The mission planners' dashboard only needs three of its fields. Read those…
Challenge
Print the rocket's name and the first mission 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.
Article Mini projects
…Time from datetime import datetime, timedelta import json class NaiveMedicationDispenser: """The Hail Mary's original dispenser - easily hackable""" def __init__(self): self.dose_history = []…