Results for “lists”

Showing 41–50 of 92

  1. Challenge

    Retry the uplink

    Send a command up to three times, taking each result from a list of simulated radio replies, and stop at the first success with break; then wait 2, 4, 8 seconds between attempts, as real retry code…

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

    Index by ID

    …is found with one lookup instead of a search through the list, then answer a list of requests, including an ID that isn't on the manifest.

    Write the code Medium 2 stages dictionaries indexing lookup in
  3. Challenge

    Normalise a command

    …with strip() and lower(), check it against the command list, then accept underscores and dashes too, so commands match however operators type them.

    Write the code Easy 3 stages strings strip lower replace
  4. Challenge

    Launch schedule digest

    Every morning, mission control wants one short list: which launches are coming up, in what order, and how long until each. The launch archive's API has all of it, as JSON, in no particular order and…

    Write the code Medium 3 stages project json datetime timedelta
  5. Article Python Fundamentals

    Nested Loops in Python

    …") # Empty surface print() # New line after each row # List of found rovers print("\n=== FOUND ROVERS REPORT ===\n") for scan_y in range(10): for scan_x in range(10): for x, y, name in lost_rovers: if…

  6. Article Python Fundamentals

    Variables and data types in Python

    …= True engines_active = False Complex Data Types Lists Ordered collections of items, great for storing sequences of data: planet_names = ["Mercury", "Venus", "Earth", "Mars"] temperatures = [167, 464…