Results for “function”

Showing 31–39 of 39

  1. Challenge

    Confirm by name

    Make abort(reason, *, confirm) refuse to run unless confirm=True is passed by name: a bare * makes confirm keyword-only and required, then an is True check refuses values that are merely truthy, such…

    Write the code Medium 2 stages functions keyword-only arguments * safety
  2. Challenge

    Log to a file

    …the file back and print it, then add an append_entry() function that adds lines at the end without wiping what is there.

    Write the code Easy 2 stages files open with write
  3. Challenge

    Test the pipeline

    …from "Telemetry pipeline" has been split into small functions, ready for the ground station to run unattended. Before it goes live, the team wants tests: whoever changes the pipeline next must find…

    Write the code Hard 2 stages project testing assert try
  4. Challenge

    Launch schedule digest

    …(ISRO) 2026-11-20 18:45 UTC Polaris Cargo 4 (NASA) A small function such as window(launch) , returning the parsed datetime, works for the comparison and as the key for sorted() . strftime("%Y-%m-%d…

    Write the code Medium 3 stages project json datetime timedelta
  5. Challenge

    Statistics module

    …The check looks for the module and makes sure your own functions are gone. Spread, and too little data Now there are three passes. For each, print the mean, the median and the standard deviation…

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

    Readings summary

    …the summary. Summarise the readings with Python's built-in functions, then make sure the summary survives a pass with no readings at all. Min, max, mean Print the lowest and the highest reading, and…

    Write the code Easy 2 stages lists min max sum
  7. Challenge

    Round or cut?

    …see your prediction next to what Python printed. The two functions handle the decimals differently. What does each one give for 1499.7? Investigate and modify Investigate. Store what int(2.9) gives in…

    Write the code Medium 3 stages int round rounding type conversion