Challenge
Names with values
Print each sensor name with its reading by looping over two lists together with zip(), then add a third list of units and warn when the lists don't have the same length, since zip() quietly stops at…
Showing 11–20 of 36
Challenge
Print each sensor name with its reading by looping over two lists together with zip(), then add a third list of units and warn when the lists don't have the same length, since zip() quietly stops at…
Challenge
…, the countdown ends like this: T-5 T-4 SCRUB at T-4 Check for the scrub before the hold, break after the scrub line, and use a flag to decide about Liftoff! after the loop.
Challenge
…gives pairs of a number and an item. Unpack them in the loop: for number, item in enumerate(checklist, start=1): . Done or not yet The crew has done the first two items. Add completed = 2 under the…
Challenge
…a dead link doesn't block everything else. Write the retry loop against a simulator that plays back the radio's replies, then space the attempts out. Up to three tries Try up to MAX_ATTEMPTS times…
Challenge
Scan a radar grid stored as a list of strings with a loop 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…
Challenge
…which returns the record dict, then let it return None for blank, comment and damaged lines so the loop only keeps real records.
Challenge
…In turn Build rota , a list of (day, shift, name) tuples for every shift of the week, in order, taking the crew in turn. Print one line per day, then count how many times one person works two shifts…
Challenge
…get() lookup, keeping the output exactly the same, then loop over the dict for a weight table.
Challenge
…then a cargo ID that doesn't match the CG- and four digits format. An empty list means the record is fine.
Challenge
The flight engineer types the burn length for the next manoeuvre. One morning the keyboard was set to a Polish layout, 12,5 went in instead of 12.5 , and the whole console program stopped with a…