Challenge
Undo and history
…and last week a crate was removed by mistake and had to be typed back in from memory. Extend the console with a history of changes, then an undo that uses it. A history of changes The console works as…
Showing 61–70 of 73
Challenge
…and last week a crate was removed by mistake and had to be typed back in from memory. Extend the console with a history of changes, then an undo that uses it. A history of changes The console works as…
Challenge
…but response_text is text, and the program stops with TypeError: string indices must be integers . Turn the text into a dict with json.loads() , then add a line for crewed : Launch: Lumen-3 Provider…
Challenge
…a version that doesn't raise at all, and one that raises TypeError instead; your check must fail on both. The message, and what must still work A function that refuses everything would pass your test…
Challenge
Engineers check averages all day: three spot readings typed by hand, a whole pass from the database, sometimes just two numbers. A function that wants a list makes every one of those calls a little…
Challenge
…With the * in place, abort("Test", True) stops with a TypeError , and so does abort("Test") . Only True itself Someone passed confirm="yes" , and since a non-empty string is true, the abort ran…
Challenge
Cargo records arrive from several warehouses, typed by different people. Before an item goes on the manifest, it has to pass a check, and when it fails, the warehouse needs to know everything that is…
Quiz
…keyword arguments with **kwargs , combining argument types and positional and keyword arguments . After this one, try the Python Functions Quiz or the Python Return Values Quiz .
Challenge
…split() gives text, so "412.5" + 273.15 would stop with a TypeError . Turn the value into a number, show it with its unit, and add the temperature in kelvin, with two decimal places: Time…
Challenge
…Python fills the rest with spaces, so remove the space you typed between the two values. Header Add a header row, so people know what the columns are: SYSTEM STATE Propulsion GO Navigation GO Comms…
Challenge
…One flight software, filled in by Python rather than typed by hand. Ask Python The starter code imports the platform module. platform.python_version() asks Python which version is running your code…