Results for “split”

Showing 1–10 of 34

  1. Challenge

    Parse the whole feed

    Go through a block of telemetry line by line with splitlines(), split each line at the commas and print the sensor and value, then unpack the four fields and show the clock time too.

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

    Sensor ID parts

    Split a sensor ID like ENG-2 into its subsystem and its unit number as an int, work out the next ID, then handle subsystems with a dash in their name using rsplit().

    Write the code Medium 2 stages strings split rsplit int
  3. Challenge

    Parse a telemetry line

    Split a telemetry reading like 2026-03-14T09:30:05Z,ENG-2,412.5,C into its four fields with split(), print each with a label, then turn the value into a number and convert it to kelvin.

    Write the code Easy 2 stages strings split parsing csv
  4. Challenge

    Telemetry report

    …C 09:30:06 CAB-1 101.3 kPa 09:30:07 BAT-3 87.2 % feed.split("\n") splits the feed into its lines, and each line splits at the commas as before. The time of day is [11:19] of the timestamp. print()…

    Write the code Medium 2 stages strings split slicing f-strings
  5. Challenge

    Sign-up cleanup

    …Tomasz Nowak <tomasz nowak@example.org> name.split() splits on any run of spaces and drops the ends, so " ".join(...) rebuilds it neatly; title() capitalises each word. Reject and deduplicate Build…

    Write the code Medium 2 stages project strings strip split
  6. Challenge

    Command parser

    …dance REJECTED "": empty command text.strip().lower().split() gives the words. Converting the length can raise its own ValueError : catch it and raise yours, with a clearer message. set mode and abort…

    Write the code Medium 2 stages project parsing strings split
  7. Challenge

    Test the pipeline

    The telemetry pipeline is now split into parse_row() and check_limits(). Write assert tests for both, good rows, rejected rows and readings right at a limit, so that each of three planted bugs makes…

    Write the code Hard 2 stages project testing assert try
  8. Challenge

    Duration formatter

    Split 100,000 seconds of mission time into hours, minutes and seconds with // and %, pad it to a 27:46:40 clock, then add days in the DDD/HH:MM:SS format.

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