Results for “is None”

Showing 1–10 of 26

  1. Challenge

    Missing reading

    …check from "Alert level" so a sensor that didn't answer, None, prints NO DATA instead of crashing, without treating a real 0 as missing, then do the same for an empty field in a telemetry line.

    Write the code Medium 2 stages if else None is None
  2. Challenge

    sort() returns None

    crew = crew.sort() leaves the roster as None. Predict it, find out what sort() really gives back, fix it by sorting in place, then sort readings from highest to lowest and keep the top three.

    Fix the code Easy 3 stages lists sort None in place
  3. Challenge

    Shared default list

    …samples from earlier calls, because the default list is created once and shared. Predict it, prove the calls share one list, fix it with None as the default, then write a function that hands out a…

    Fix the code Medium 3 stages functions default values mutable defaults None
  4. Challenge

    Edge cases

    …first, then the edge cases, an empty list that should give None and lists with negative values, so broken copies of the function can't pass.

    Write the code Medium 2 stages testing assert edge cases None
  5. Challenge

    Test the parser

    …function": the whole record for a good line first, then None for a blank line, a comment and a line with a missing field, so a broken parser can't pass.

    Write the code Medium 2 stages testing assert parsing None
  6. Challenge

    Manifest validator

    …wrong with one cargo item: missing fields, a mass that isn't a number, is 0 or is over the limit. Print a pass or fail line per item, then catch duplicate IDs and check the total load.

    Write the code Medium 2 stages project validation dictionaries functions
  7. Challenge

    Parser function

    …which returns the record dict, then let it return None for blank, comment and damaged lines so the loop only keeps real records.

    Fix the code Medium 2 stages functions return dictionaries None
  8. Challenge

    Prints instead of returns

    …its result instead of returning it, so the caller gets None. Predict the last line, find out what the function gives back, fix it with return, then write a conversion function that returns.

    Fix the code Easy 3 stages functions return print None