Results for “strip”

Showing 11–20 of 44

  1. Challenge

    Log formatter function

    Move the mission log's f-string into format_log(t, level, msg), a function that returns the line instead of printing it, then fix the alignment of every log line with one change inside the function.

    Fix the code Easy 2 stages functions def return refactoring
  2. Challenge

    Debris grid

    Scan a radar grid stored as a list of strings with a loop 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…

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

    Aligned status board

    …the other kind of quotes inside, so they don't end the f-string. Readings on the right The board gets a third column: each system's temperature in °C. Numbers read best aligned to the right, so their…

    Write the code Medium 3 stages f-strings alignment tables formatting
  4. Challenge

    Log line format

    …log line like [T+00:12:05] INFO Engines nominal with an f-string, then build the timestamp from numbers with zero padding.

    Write the code Easy 2 stages f-strings print logs formatting
  5. Challenge

    Redact the access code

    …of an access code with * using len(), slicing and string repetition, then find a code inside a log line and mask it there before the line is saved.

    Write the code Medium 2 stages strings slicing len replace
  6. Challenge

    Search the log

    Check whether a mission log line contains ERROR with in, find where it starts with find(), including the -1 it gives when there is nothing to find, then slice out the error message.

    Write the code Medium 2 stages strings in find slicing
  7. Challenge

    Survive bad lines

    …2026-03-14T09:30:10Z,CABIN,ERR,kPa (could not convert string to float: 'ERR') 09:30:10 ENG-2: 415.0 C Skipped: 2026-03-14T09:30:15Z,ENG-2,4l7.9,C (could not convert string to float: '4l7.9') 09:30:15…

    Write the code Medium 2 stages errors try except ValueError
  8. Challenge

    Parser function

    …Move the skipping into the function as well. parse_line() strips the line, so spaces around a good line don't end up in its fields, and returns None for a blank line, a comment, or a line that doesn't…

    Fix the code Medium 2 stages functions return dictionaries None