Results for “enumerate”

Showing 1–10 of 12

  1. Challenge

    Debris grid

    …inside a loop, print the row and column of every # with enumerate(), then turn the loops around to find the columns that are clear all the way through.

    Write the code Medium 2 stages nested loops enumerate range strings
  2. Challenge

    Numbered checklist

    Print a pre-flight checklist numbered from 1 with enumerate(list, start=1), then tick off the items the crew has already done with [x] and leave the rest as [ ].

    Write the code Easy 2 stages for loop enumerate start lists
  3. Challenge

    First error

    …log for the first ERROR entry, print its line number with enumerate() and stop there with break, then report how many lines were checked, or that there were no errors at all.

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

    Log analyser

    …Warnings by subsystem: 1. POWER: 3 2. GNC: 2 3. COMMS: 1 enumerate(warnings.most_common(), start=1) gives the rank and each (subsystem, count) pair; unpack them as rank, (subsystem, count) .

    Write the code Hard 3 stages project logs parsing Counter
  5. Article Mini projects

    Medical dispenser - Don’t trust the user

    …= json.load(f) # Verify chain integrity for i, event in enumerate(events): # Reconstruct the message that was signed event_copy = event.copy() stored_hmac = event_copy.pop('hmac') event_string =…

  6. Article Mini projects

    Managing Astronaut Medical Data with Python

    …Records") for i, astronaut in enumerate(astronauts): ttk.Label(astronaut_window, text=f"ID: {astronaut[0]}, Name: {astronaut[1]}, Age: {astronaut[2]}, Nationality: {astronaut[3]}").grid(row=i…

  7. Challenge

    Telemetry pipeline

    …line 8: unknown sensor ENG-9 Valid: 7, rejected: 2 enumerate(csv.DictReader(csv_file), start=2) numbers the rows the way the file does. Check the sensor first, then try the conversion. Flag the limits…

    Write the code Hard 3 stages project csv json files
  8. 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