Challenge
Sort by a field
…dates in order, and the loading crew wants the heaviest items first, because they go lowest in the racks. Sort both lists by one of their fields. By date Print the launches from the earliest date to…
Showing 11–20 of 27
Challenge
…dates in order, and the loading crew wants the heaviest items first, because they go lowest in the racks. Sort both lists by one of their fields. By date Print the launches from the earliest date to…
Challenge
The load planners don't need every item: they need to know how much each kind of cargo weighs, because food, life support and spares go into different racks with different mass limits. Total the…
Challenge
…fields is a dict: build the line, then loop over fields.items() and add to it. Fields from dicts The fields often come ready in dicts. Pass them as keyword arguments with ** : first reading alone…
Challenge
…10 dark_mode: True alerts: all Loop over user_settings.items() and check each key with in DEFAULTS .
Challenge
The tank check is full of prints left over from debugging. Replace them with logging calls at the right levels, so debug records stay hidden until switched on, then give the fuel code its own named…
Challenge
From today's passes over four ground stations, collect every contact window longer than 8 minutes into one list, sorted by time, then find the longest stretch with no station in contact, counting…
Challenge
A Python program stops with a traceback. Read it from the bottom up to find the error, the function and the line, fix the bug there, then follow a longer traceback through four calls to a second bug.
Challenge
Count the mission log's entries per level, INFO, WARN and ERROR, in a dict of counters, then count any level at all with get() when DEBUG lines turn up, and print the levels in alphabetical order.
Challenge
…and record every change that actually happens as (action, item, mass) : ("add", "CG-0042", 18.5) or ("remove", "CG-0042", 18.5) . Refused commands change nothing, so they aren't recorded. Add a…
Challenge
…the same, then add a fourth tank with a single list item and list the low tanks.