Results for “tuples”

Showing 11–20 of 28

  1. Challenge

    Shift rota

    …work. In turn Build rota , a list of (day, shift, name) tuples for every shift of the week, in order, taking the crew in turn. Print one line per day, then count how many times one person works two…

    Write the code Hard 2 stages project scheduling lists tuples
  2. Challenge

    Ground pass planner

    …10.5 min 12:50:00-13:02:45 Toruń 12.8 min Because each tuple starts with the start time, windows.sort() puts them in time order. {start:%H:%M:%S} formats just the time. The longest silence Find the…

    Write the code Medium 2 stages project datetime timedelta sorting
  3. Challenge

    Alert deduplicator

    The monitoring system raises the same alert over and over. Group repeats of an alert that come within 60 seconds of the first into one line with a count, in the order they first appeared, then add the…

    Write the code Hard 2 stages project dictionaries tuples as keys grouping
  4. 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
  5. Challenge

    Unit converter

    Write convert(), which looks a unit pair up in a table of factors, works the other way round by dividing, and refuses unknown units or missing pairs with a clear ValueError, then extend the table with…

    Write the code Medium 2 stages project dictionaries tuples as keys functions
  6. Challenge

    Extract a function

    Move a 3D distance calculation that is copied for three waypoints into distance_km(a, b), keeping the output exactly the same, then put the waypoints in a dict and find the nearest one with the same…

    Fix the code Easy 2 stages functions refactoring return tuples