Challenge
Duplicate events
Print each capsule event once, keeping the first copy, by checking every ID against a set of IDs already seen, then report which IDs came in more than once.
Showing 51–60 of 63
Challenge
Print each capsule event once, keeping the first copy, by checking every ID against a set of IDs already seen, then report which IDs came in more than once.
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
Go through the mission log and build a new list holding only the WARN and ERROR entries with append(), then let a minimum level decide what counts, the way logging tools filter by severity.
Challenge
Scan the mission 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
Extend the feed parser so continue skips blank lines and comment lines, then report damaged lines with too few fields instead of crashing, with a count of parsed and damaged lines.
Challenge
A crew count read with input() crashes when 1 is added to it. Predict the crash, find out what input() really returns, fix it with int(), then write a packing tool that reads two numbers.
Challenge
…101.2 kPa zip() takes three lists as easily as two. But if one list is shorter, it stops early without a word, and a reading goes missing from the display. Before the loop, check that the three…
Challenge
…orbit=12 station=GS-2 format_log(..., **reading) works as if you had written sensor="ENG-2", temperature_c=455.2 yourself.
Challenge
…{'count': 0, 'min': None, 'max': None, 'mean': None} Check if not readings: first and return early.
Challenge
…Site: 18.4447° N, 77.4508° E Choose each letter with an if : 0 and above is N or E, below 0 is S or W. abs() gives a number without its sign. Curiosity's landing site, (-4.5895, 137.4417), would be…