Challenge
Debris grid
…inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way through.
7 results
Challenge
…inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way through.
Challenge
Print a pre-flight checklist numbered from 1 with enumerate(list, start=1), then tick off the items the crew has already done with [x] and leave the rest as [ ].
Challenge
…log for the first ERROR entry, print its line number with enumerate() and stop there with break, then report how many lines were checked, or that there were no errors at all.
Challenge
…Warnings by subsystem: 1. POWER: 3 2. GNC: 2 3. COMMS: 1 enumerate(warnings.most_common(), start=1) gives the rank and each (subsystem, count) pair; unpack them as rank, (subsystem, count) .
Challenge
…line 8: unknown sensor ENG-9 Valid: 7, rejected: 2 enumerate(csv.DictReader(csv_file), start=2) numbers the rows the way the file does. Check the sensor first, then try the conversion. Flag the limits…
Challenge
Extend the working cargo console: record every change to the hold in a history list and show it with a history command, then add undo, which takes the last change off the history and reverses it.
Challenge
Write problems(item), which lists everything wrong with one cargo item: missing fields, a mass that isn't a number, is 0 or is over the limit. Print a pass or fail line per item, then catch duplicate…