Results for “for”

Showing 171–180 of 202

  1. Challenge

    Summary function

    …the alert system all need those numbers, each in its own format, for every pass, including the ones where the sensor sent nothing. Write one function that returns the whole summary, then make it safe…

    Write the code Medium 2 stages functions return dictionaries min
  2. Challenge

    Index by ID

    The crew ask for cargo by ID all day long: "where is CG-0045, and how heavy is it?". Searching the whole manifest list for every question works for six items, but the real manifest has thousands…

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

    Approved payloads

    …Check an ID against the list, then make the check work for IDs typed by hand. On the list? Print whether the payload is on the approved list: PL-204 approved: True payload_id in approved gives True or…

    Write the code Easy 2 stages lists in membership if
  4. Challenge

    Upload router

    ….png or .jpg images .csv telemetry anything else rejected For the camera image in the starter code: cam-1_2026-03-14.png -> images/ Use endswith() for each extension, or to accept two, and store the…

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

    Accept the right files

    …a photo and a backup file, and the archive's import broke for a day. Check every path before it's accepted, then make the checks work for paths typed on a Windows PC. Check the ends Print whether the…

    Write the code Easy 2 stages strings startswith endswith paths
  6. Challenge

    Guard clauses

    …condition at a time, each inside the last, and the reason for a refusal now sits four levels deep, at the far end of an else whose if is off the top of the screen. Flatten the function without…

    Fix the code Medium 2 stages functions return guard clauses refactoring