Results for “and”

Showing 41–50 of 233

  1. Challenge

    Sign-up cleanup

    Clean the crew sign-ups for the analogue mission: trim and capitalise names, lower-case emails, then reject sign-ups with no name or a broken email and drop duplicates by email, saying why for each…

    Write the code Medium 2 stages project strings strip split
  2. Challenge

    Command parser

    …commands such as burn 12.5 or set mode safe into tuples and raises ValueError with a reason for anything malformed, then run a whole batch of commands and report each one.

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

    Mission elapsed time

    Parse the launch and the latest telemetry timestamp with datetime.fromisoformat(), subtract them to get the mission elapsed time, then time events reported by ground stations in three different time…

    Write the code Medium 2 stages datetime timedelta ISO 8601 time zones
  4. Challenge

    Launch counter crash

    record_launch() adds 1 to a global counter and stops with an UnboundLocalError. Predict it, find out why Python treats the name as local, fix it by passing the count in and returning the new one, then…

    Fix the code Medium 3 stages functions scope UnboundLocalError global
  5. Challenge

    Shadowed fuel

    …to fuel_kg inside the function, creating a local variable and leaving the global fuel unchanged. Predict the last line, compare both values, fix it by returning the total, then write a function that…

    Fix the code Medium 3 stages functions scope local variables global variables
  6. Challenge

    Sort by a field

    Sort launches by date with sorted() and a small function that returns each launch's date, then sort the cargo manifest heaviest first with a key function and reverse=True.

    Write the code Easy 2 stages functions sorted key reverse
  7. Challenge

    Manifest diff

    Compare yesterday's and today's cargo IDs with set difference to print what was added and what was removed, then count what stayed with an intersection and print none for an empty change.

    Write the code Easy 2 stages sets difference intersection sorted
  8. Challenge

    Print the manifest

    …of dicts, one per item, with an ID, a name, a category and a mass. The loading crew wants it printed, one line per item, with the total at the bottom. Every item Print one manifest line for every…

    Write the code Easy 2 stages dictionaries lists of dicts for loop formatting
  9. Challenge

    Line to record

    …it stores every reading as a dict with time, sensor, value and unit in a list of records, then let other code pick out one sensor's readings by key.

    Write the code Easy 2 stages dictionaries lists parsing records
  10. Challenge

    Nested response

    Print the rocket's name and the first mission patch URL from a nested launch response by chaining keys and indexes, then add the operator and orbit and cope with a launch that has no patches yet.

    Write the code Easy 2 stages dictionaries nested data lists JSON