Results for “print function”

Showing 31–39 of 39

  1. Challenge

    Confirm by name

    …out, and return the refusal when it isn't true. The calls print: ABORT: Cabin pressure falling Abort refused: pass confirm=True With the * in place, abort("Test", True) stops with a TypeError , and so…

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

    Config loader

    …config as a copy of DEFAULTS , fill in what was saved, and print every setting in name order, with the value written as JSON: downlink_rate_kbps = "256" log_level = "INFO" log_levl = "DEBUG" retries =…

    Write the code Hard 3 stages project json configuration validation
  3. Challenge

    Command parser

    …the reason for anything else. Then try every command and print OK and the result, or REJECTED , the command in quotes and the reason: OK ('burn', 12.5) OK ('burn', 3.0) OK ('burn', 0.5) REJECTED…

    Write the code Medium 2 stages project parsing strings split
  4. Challenge

    Live T-minus

    …before launch, and at launch itself, and T+ after it, then print countdown(launch, datetime.now(timezone.utc)) . With the clock stopped five minutes after launch, the check expects: T+00:05:00 Pick…

    Write the code Medium 2 stages datetime datetime.now timezone countdown
  5. Challenge

    Unit converter

    Write convert(), which looks a unit pair up in a table of factors, works the other way round by dividing, and refuses unknown units or missing pairs with a clear ValueError, then extend the table with…

    Write the code Medium 2 stages project dictionaries tuples as keys functions
  6. 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
  7. Challenge

    Round or cut?

    …Don't run the code yet. Read it and decide what it will print. Write your guess in prediction , at the top, between the quotes. Then run it and compare. Any guess passes this stage: the point is to…

    Write the code Medium 3 stages int round rounding type conversion
  8. Challenge

    Statistics module

    …and median() , add import statistics at the top, and print the same two lines with statistics.mean() and statistics.median() : Mean: 418.8 C Median: 413.8 C The output doesn't change: that is the…

    Fix the code Easy 2 stages statistics mean median stdev
  9. 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