Results for “and”

Showing 61–70 of 233

  1. Challenge

    Prints instead of returns

    …another conversion that the crew displays can use. Predict and run Don't run the code yet. Read it and decide what it will print on its last line. Write your guess in prediction , at the top, between…

    Fix the code Easy 3 stages functions return print None
  2. Challenge

    Validate a cargo record

    …of everything wrong with a cargo record: missing fields and a negative mass, then a cargo ID that doesn't match the CG- and four digits format. An empty list means the record is fine.

    Write the code Medium 2 stages functions return lists validation
  3. Challenge

    Debris grid

    …a list of strings with a loop inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way through.

    Write the code Medium 2 stages nested loops enumerate range strings
  4. Challenge

    Filter the log

    Go through the mission log and build a new list holding only the WARN and ERROR entries with append(), then let a minimum level decide what counts, the way logging tools filter by severity.

    Write the code Medium 2 stages for loop lists append filtering
  5. Challenge

    First error

    …first ERROR entry, print its line number with enumerate() and stop there with break, then report how many lines were checked, or that there were no errors at all.

    Write the code Easy 2 stages for loop break enumerate flags
  6. Challenge

    Readings summary

    Summarise a list of engine readings with min(), max() and a mean from sum() / len(), then add the spread and make the summary cope with an empty list instead of crashing.

    Write the code Easy 2 stages lists min max sum