Results for “sum”

Showing 1–10 of 21

  1. 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
  2. Challenge

    Summary function

    Write summarise(readings), which returns the count, min, max and mean of a list of readings as one dict, then make it handle a pass with no data and round the mean, so any program can use the summary.

    Write the code Medium 2 stages functions return dictionaries min
  3. Challenge

    JSON out

    Turn the day's mission summary dict into JSON text with json.dumps() and indent=2, see what True, False and None become, then keep the station's Polish letters readable and sort the keys so the files…

    Write the code Easy 2 stages json json.dumps modules import
  4. Challenge

    Legacy script

    …for each engine. Restructure it into parse_feed() and summary_line() with the output unchanged to the character, then add assert tests that would catch either function breaking.

    Fix the code Hard 2 stages project refactoring functions testing
  5. Challenge

    Statistics module

    Refactor the temperature summary: delete the hand-written mean() and median() and use statistics.mean() and statistics.median() instead, then add the standard deviation and handle passes with too few…

    Fix the code Easy 2 stages statistics mean median stdev
  6. Challenge

    Unit mix-up

    …the code prints, find the leg that doesn't fit, fix the sum, then convert a lander's sensor readings yourself. Predict and run Don't run the code yet. Read it and decide what it will print. Write your…

    Fix the code Easy 3 stages units conversion constants debugging