Results for “strip”

Showing 41–44 of 44

  1. Challenge

    Parse the whole feed

    …kPa ENG-2: 415.0 C feed.splitlines() gives a list with one string per line. Inside the loop, line.split(",") gives the four fields, as in "Parse a telemetry line". Named fields and the time Unpack the…

    Write the code Easy 2 stages for loop splitlines split unpacking
  2. Challenge

    Crew roster

    …member: Kowalska Crew size: 4 Indexes start at 0, as in strings. crew[-1] is the last item whatever the list's length, and len(crew) counts the items. The whole roster Add the second in command, who…

    Write the code Easy 2 stages lists indexing negative index len
  3. Challenge

    Last five readings

    …at the end. A negative start counts from the end, as with strings. The window moves A new reading has arrived. Add new_reading = 772 under the list, append it to the readings, then show the new window…

    Write the code Easy 2 stages lists slicing negative slice append
  4. Challenge

    Duration formatter

    …digits, so 3725 seconds would show as 01:02:05 . In an f-string, {minutes:02d} pads a whole number with zeros to two digits. Days too Long missions count days as well. Mission control displays often…

    Write the code Easy 3 stages floor division modulo // %