Challenge
Test the parser
…compare the whole record parse_line() returns with the dict you expect, so every field and its type are checked. When they all hold, print: All checks passed For example, a line from the feed…
Showing 31–40 of 58
Challenge
…compare the whole record parse_line() returns with the dict you expect, so every field and its type are checked. When they all hold, print: All checks passed For example, a line from the feed…
Challenge
Sort launches by date with sorted() and a small function that returns each launch's date, then sort the cargo manifest heaviest first with a key function and reverse=True.
Challenge
…only the launches whose status is Go from a list of launch dicts, then collect the others with their status into one "not go yet" line, or none.
Quiz
…the earlier quizzes, from variables and strings to lists, dictionaries and functions. For each piece of code you decide which error it raises, read the message, or choose the fix. What the quiz covers…
Quiz
…. After this one, try the Python Tuples Quiz or the Python Dictionaries Quiz .
Quiz
…. After this one, try the Python Lists Quiz or the Python Dictionaries Quiz .
Challenge
…no board at all. Predict what happens, find out what the dict really holds, fix it, then build a board that copes with any missing field. Predict and run Don't run the code yet. Read it and decide…
Challenge
…09:33:05 COMMS Signal weak (x2) Keep the groups as dicts in a list, groups , with first , last , source , message and count , and a dict from (source, message) to the newest group for that alert…
Challenge
…output exactly as it is now: parse_feed(feed) returns a dict from each sensor to its list of values, as floats, in order; summary_line(sensor, values) returns one report line: the average rounded to…
Challenge
…<minjun.kim@example.org> Keep the emails seen so far in a dict, email -> name , so a duplicate can say whose it is.