Log line format
Turn values into a log line like [T+00:12:05] INFO Engines nominal with an f-string, then build the timestamp from numbers with zero padding.
Start the challengePractise what this example shows with these challenges.
Turn values into a log line like [T+00:12:05] INFO Engines nominal with an f-string, then build the timestamp from numbers with zero padding.
Start the challengePrint 7.6612 as Speed: 7.66 km/s, 1234567 as Mass: 1,234,567 kg and a fuel fraction as a percentage, using format specs in f-strings.
Start the challengePrint systems and their states in aligned columns with width specifiers like {name:<12}, then add a header and a right-aligned column of readings.
Start the challengeExtend the parser from "Parse a telemetry line" to read three readings from a multi-line feed, print each as one row, then turn them into a report with a header and aligned columns.
Start the challengeTurn the day's subsystem status into a fixed-width report for the shift handover, with aligned columns and a totals line, then save the same data as a CSV file with csv.DictWriter for the spreadsheet people.
Start the challengeStuck on this example or want to go further? Ask here, or see what others asked.
Log in to ask and reply.
Separate arguments with commas. They're passed on every Run as sys.argv[1:].
Log in or create a free account to save your code and share it with a link. Your code will be waiting here when you come back.