Challenge
Settings with defaults
Build a user's settings by copying the defaults and laying their own values on top with update(), so any setting they haven't changed falls back, then warn about unknown keys instead of saving them.
Showing 91–100 of 233
Challenge
Build a user's settings by copying the defaults and laying their own values on top with update(), so any setting they haven't changed falls back, then warn about unknown keys instead of saving them.
Challenge
Every launch has a countdown, and most countdowns have planned holds: pauses at fixed points where the teams run their final checks. Sometimes a check fails, and the launch is scrubbed on the spot…
Challenge
…with extend(), then fetch page after page in a while loop and stop at the first short page, the way paginated API responses are read.
Challenge
…it over every temperature in a list, then count the WARN and CRITICAL readings for a summary line.
Challenge
Print the commander, the newest member and the crew size from a list with [0], [-1] and len(), then add the second in command and the whole roster joined into one line.
Challenge
…(lat, lon) tuple, unpack it into two variables in one line and print both to four decimals, then show it the way maps do, with N, S, E and W.
Challenge
…an (id, item, mass_kg) tuple into three named variables and print a cargo manifest line, then fix the ValueError when the manifest adds a fourth field.
Challenge
…with len(), fix it with [-1], then print the first, middle and last readings for any length.
Challenge
An oxygen check uses = instead of == and has a line that isn't indented, so Python refuses to run it. Predict what happens, fix both errors one after the other, then write an if/else check yourself.
Challenge
…chain of ranges, then accept longitudes from 0 to 360 and reject values that can't be longitudes.