Results for “extend”

Showing 1–10 of 19

  1. Challenge

    Paged results

    Merge three pages of launch results into one list with extend(), then fetch page after page in a while loop and stop at the first short page, the way paginated API responses are read.

    Write the code Medium 2 stages for loop while loop extend break
  2. Challenge

    Undo and history

    Extend the working cargo console: record every change to the hold in a history list and show it with a history command, then add undo, which takes the last change off the history and reverses it.

    Write the code Hard 2 stages project lists stack append
  3. Challenge

    Missing reading

    Extend the alert check from "Alert level" so a sensor that didn't answer, None, prints NO DATA instead of crashing, without treating a real 0 as missing, then do the same for an empty field in a…

    Write the code Medium 2 stages if else None is None
  4. Challenge

    Telemetry report

    Extend the parser from "Parse a telemetry line" to read three readings from a multi-line feed, print each as one row, then turn them into a report with a header and aligned columns.

    Write the code Medium 2 stages strings split slicing f-strings
  5. Challenge

    Upload router

    …an uploaded file to images, telemetry or rejected by its extension with an if/elif chain and endswith(), then cope with capitals, spaces and more extensions without changing the name that is shown.

    Write the code Easy 2 stages if elif else or
  6. Challenge

    Live T-minus

    Extend the formatter from "Duration formatter": work out the seconds left from the launch time and datetime.now(timezone.utc) instead of a number typed by hand, then turn it into a countdown() that…

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

    Survive bad lines

    Extend the feed parser from "Skip blanks and comments": a faulty sensor sends ERR and float() stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too…

    Write the code Medium 2 stages errors try except ValueError
  8. Challenge

    Extra log fields

    Extend format_log() from "Log formatter function" with **fields, so any extra keyword arguments are added to the line as key=value pairs, then pass whole dicts of fields into it with ** at the call.

    Write the code Medium 2 stages functions **kwargs keyword arguments dictionaries
  9. Challenge

    Line to record

    Extend the feed parser so 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