Results for “is None”

Showing 11–20 of 39

  1. Challenge

    Test the pipeline

    The telemetry pipeline is now split into parse_row() and check_limits(). Write assert tests for both, good rows, rejected rows and readings right at a limit, so that each of three planted bugs makes…

    Write the code Hard 2 stages project testing assert try
  2. Challenge

    Silent branch

    status_light() returns None for Scrub because that branch sets a variable but never returns it. Predict the last line, find which statuses give None, make every path return, then write a function…

    Fix the code Easy 3 stages functions return None branches
  3. Challenge

    Catch what you expect

    …has a try and an except , so it can't crash, but the bug is hiding somewhere inside it. Predict what the program prints, find out what the except is catching, and make it catch only what it should…

    Fix the code Medium 3 stages errors try except ValueError
  4. Challenge

    Lookup table

    …3.7 m/s², a 92.5 kg astronaut weighs 342 N A body that isn't in the table still prints the no-data line: GRAVITY_M_S2.get(body) gives None for a missing key, just like the old else . The whole table…

    Fix the code Medium 2 stages dictionaries refactoring lookup tables get
  5. Challenge

    Flight software review

    …you where to look. The fifth doesn't stop anything, and it is the most dangerous one. Make it run Run the program, read the error, fix it, and run again, until it runs to the end. Four bugs stop it: a…

    Fix the code Hard 2 stages project debugging SyntaxError TypeError