File name from data
The ground station saves each sensor's readings for the day in a file of its own. The names have to be predictable, so scripts can find them, and safe, so they work on every operating system: lower case, no spaces, the sensor first and then the date.
Build the file names from the data, then a folder path for each sensor.
Finish stage 1 to unlock this stage.
Build the file name for this sensor's data: the ID in lower case, an underscore, the date and .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()}.
Finish stage 1 to unlock this stage.
The configuration form gives sensors names like Star Tracker A, and the time of the first reading as a timestamp. Build the same kind of file name from those:
File: star-tracker-a_2026-03-14.csv
Make the name lower case, with dashes instead of spaces, and remove any spaces around it first, since people type those into forms. The date is the first 10 characters of the timestamp.
Finish stage 2 to unlock this stage.
Each sensor's files go into a folder of their own, named after the sensor, inside telemetry/. Add the full path:
File: star-tracker-a_2026-03-14.csv Path: telemetry/star-tracker-a/star-tracker-a_2026-03-14.csv
Reuse the slug and the file name you already built.
Hints
Creating and Joining Strings
# Strings - text in Python
# Creating strings
callsign = "Houston"
astronaut = "Watney"
# Joining strings with +
transmission = callsign + ", this is " + astronaut + "."
print(transmission)
# Repeating strings with *
divider = "=" * 30
print(divider)
print("MISSION LOG - SOL 18")
print(divider)
# Building strings step by step with +=
status = ""
status += "Oxygen OK. "
status += "Water OK. "
status += "Potatoes growing."
print(status)
# String length with len()
mission_id = "ARES-III-MDV-7"
print("ID:", mission_id)
print("Length:", len(mission_id), "characters")
Separate arguments with commas. They're passed on every Run as sys.argv[1:].