Challenge
Swapped arguments
…2 -> Lab, 18.5 kg CG-0043: Airlock -> Node 2, 2.36 kg from_module and to_module are both module names: exactly the pair that is easy to swap.
Showing 11–20 of 30
Challenge
…2 -> Lab, 18.5 kg CG-0043: Airlock -> Node 2, 2.36 kg from_module and to_module are both module names: exactly the pair that is easy to swap.
Challenge
Refactor the level counter from "Entries per level": replace the dict and counts.get() with collections.Counter, which starts every key at 0, then list the levels from most to least common with…
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
Extend the formatter from "Duration formatter": work out the seconds left from the launch time and datetime.now(timezone.utc) instead of a number typed by hand, then turn it into a countdown() that…
Challenge
Simulate 100 sensor readings, each with a 5% chance of a glitch, and seed random with 42 so the count is the same on every run and a test can check it exactly, then pick a kind for each glitch with…
Challenge
…============================== ALERT: Cabin pressure low Module: Habitat 2 Action: Crew to suits ============================== Each new line inside the text needs its own \n . Title in the border…
Challenge
Somebody wrote a quick calculation for the cargo module and called the variables a , b , x2 and tmp . The program works, but nobody, including its author a month from now, can tell what it calculates…
Article Python Fundamentals
…sensor", "Wheel drive", "Robotic arm", "Soil analysis module" ] print("=== STARTING SECTOR SCAN ===\n") # First loop: scan the map for scan_y in range(10): for scan_x in range(10): # Second loop…
Challenge
…version. Ask Python for it with the platform and sys modules and print it the way python --version does.
Challenge
…in order. A new field The manifest now also records the module each item is stowed in. The starter code stops with ValueError: too many values to unpack , because the tuple has four values and only…