Results for “max”

9 results

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

    Legacy script

    …and after: ENGINE REPORT ============= ENG-1 avg 425.6 max 431.75 OK ENG-2 avg 400.4 max 402.25 OK ENG-3 avg 440.1 max 455.0 HOT Engines running hot: 1 Run the original first and keep its output to…

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

    Retry the uplink

    …then space the attempts out. Up to three tries Try up to MAX_ATTEMPTS times. Attempt 1 gets the first result from the list, attempt 2 the second, and so on. Print each attempt, stop at the first "ok"…

    Write the code Medium 2 stages for loop range break retry
  5. Challenge

    Manifest validator

    …then a mass that is not a number, is 0 or less, or is over MAX_ITEM_KG . Then print one line per item, named by its id or, without one, by its position: CG-0042 PASS CG-0043 PASS CG-0044 FAIL: missing…

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

    JSON out

    …"JAXA", "ground_station": "Toru\u0144", "orbits": 12, "max_temp_c": 455.2, "alerts": [ "Battery 3 temperature high", "Star tracker lost lock" ], "crewed": false, "next_pass": null } Use…

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

    Guard clauses

    Rewrite the four nested ifs in can_dock() as guard clauses that return a reason as soon as a check fails, keeping every answer the same, then add a new docking rule as one more guard with a default…

    Fix the code Medium 2 stages functions return guard clauses refactoring
  8. Challenge

    Log analyser

    …into its time, level, subsystem and message with split(maxsplit=3) , so the message stays whole, and keep them as dicts in entries , with the time as "HH:MM:SS" . Then count the entries per level…

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

    Launch commit criteria

    Clear a launch only if the wind is under 30 km/h, there is no lightning and range safety reports GO, using and and not, then print every rule that is holding the launch.

    Write the code Easy 2 stages if else and not