Results for “is None”

Showing 11–20 of 26

  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
  6. Challenge

    Log analyser

    …10:00: 4 11:00: 5 Two Counter s do the counting; the hour is the first two characters of the time, plus ":00" . The first error Find the first ERROR entry and print its time, subsystem and message, or…

    Write the code Hard 3 stages project logs parsing Counter
  7. Challenge

    Alert deduplicator

    …message) to the newest group for that alert. to_seconds() is given. Time ranges and a summary For a line that collapses several alerts, show the time of the first and the last, and finish with how…

    Write the code Hard 2 stages project dictionaries tuples as keys grouping
  8. Challenge

    Debris grid

    …the sector ahead and sends back a small map: each row is a string, # marks debris and . is clear space. The flight dynamics team needs the exact position of every piece. Scan the grid for debris, then…

    Write the code Medium 2 stages nested loops enumerate range strings