Challenge
Test the error
…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…
Showing 31–40 of 40
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
…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, "2026-03-14T09:30:05Z,ENG-2,412.5,C" , should…
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…
Challenge
…and remove any spaces around it first, since people type those into forms. The date is the first 10 characters of the timestamp. A folder for each sensor Each sensor's files go into a folder of their…
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
…code that builds these lines from values, so nobody has to type them by hand. Fill in the pattern The starter code gives you three values. Print them as one log line, in exactly this shape…
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…