Results for “python loops”

Showing 11–20 of 57

  1. Challenge

    Shift rota

    Build the station's weekly shift rota: three shifts a day, the crew taken in turn so nobody works two shifts in a row, with a check that proves it, then plan around days off while keeping the work…

    Write the code Hard 2 stages project scheduling lists tuples
  2. 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
  3. Challenge

    Copy-pasted blocks

    …blocks with a list of (name, level) pairs and one loop, keeping the output exactly the same, then add a fourth tank with a single list item and list the low tanks.

    Fix the code Medium 2 stages refactoring for loop tuples lists
  4. Challenge

    First error

    …on line 4: [T+00:14:47] ERROR Fuel valve 2 not responding Loop with enumerate(log, start=1) . Look for "] ERROR" , as in "Count warnings", so a message that only mentions the word doesn't count. break…

    Write the code Easy 2 stages for loop break enumerate flags
  5. Challenge

    Paged results

    …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