Results for “None”

Showing 1–10 of 43

  1. 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 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