Results for “timestamp”

Showing 11–18 of 18

  1. Challenge

    Log analyser

    Turn the launch-day mission log into answers: parse each line into a dict, count the entries per level and per hour, find the first ERROR, then rank the subsystems by how many warnings they raised.

    Write the code Hard 3 stages project logs parsing Counter
  2. Challenge

    Survive bad lines

    Extend the feed parser from "Skip blanks and comments": a faulty sensor sends ERR and float() stops the program. Skip lines that fail to convert and count them, then let one try cover short lines too…

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

    Parser function

    Move the feed parser from "Line to record" into parse_line(line), which returns the record dict, then let it return None for blank, comment and damaged lines so the loop only keeps real records.

    Fix the code Medium 2 stages functions return dictionaries None
  4. Challenge

    Test the parser

    Write assert checks for parse_line() from "Parser function": the whole record for a good line first, then None for a blank line, a comment and a line with a missing field, so a broken parser can't…

    Write the code Medium 2 stages testing assert parsing None
  5. Challenge

    Skip blanks and comments

    Extend the feed parser so continue skips blank lines and comment lines, then report damaged lines with too few fields instead of crashing, with a count of parsed and damaged lines.

    Write the code Medium 2 stages for loop continue strip startswith
  6. Challenge

    Legacy script

    A 70-line engine report repeats the same twelve lines for each engine. Restructure it into parse_feed() and summary_line() with the output unchanged to the character, then add assert tests that would…

    Fix the code Hard 2 stages project refactoring functions testing
  7. Challenge

    Parse the whole feed

    …line", and start each line with the clock time from the timestamp: 09:30:05 ENG-2: 412.5 C 09:30:05 TANK-1: 78.3 % 09:30:10 CABIN: 101.2 kPa 09:30:10 ENG-2: 415.0 C timestamp, sensor, value, unit =…

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

    Telemetry report

    …at the commas as before. The time of day is [11:19] of the timestamp. print() puts a space between its values. Aligned columns Now make it a report: a header row and columns that line up, with the…

    Write the code Medium 2 stages strings split slicing f-strings