Results for “f-string”

Showing 1–10 of 17

  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

    Aligned status board

    …Use 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…

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

    Log line format

    …a 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
  4. Challenge

    File name from data

    ….csv . Then print it: File: eng-2_2026-03-14.csv Inside an f-string's braces you can call methods too: {sensor_id.lower()} . From a name The configuration form gives sensors names like Star Tracker A…

    Write the code Easy 3 stages strings f-strings lower replace
  5. Challenge

    Daily mission report

    Turn 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…

    Write the code Medium 2 stages project formatting f-strings alignment