Space Python Loading Python…

Parse a telemetry line

Write the codeEasy 2 stages

In "CSV row" you printed a reading as comma-separated values. Now Python One's ground software receives those lines and has to take them apart again: which part is the time, which the sensor, which the value.

2026-03-14T09:30:05Z,ENG-2,412.5,C

Split the line into its fields, then turn the value into a number you can calculate with.

Split the line at the commas and print each field with a label:

Time: 2026-03-14T09:30:05Z
Sensor: ENG-2
Value: 412.5
Unit: C

line.split(",") cuts the text at every comma and gives a list of the pieces. You pick a piece by its index, the same way as a character in a string: fields[0] is the first. Lists get a stage of their own later.

Print the four fields
Works for any reading

Finish stage 1 to unlock this stage.

split() gives text, so "412.5" + 273.15 would stop with a TypeError. Turn the value into a number, show it with its unit, and add the temperature in kelvin, with two decimal places:

Time: 2026-03-14T09:30:05Z
Sensor: ENG-2
Value: 412.5 C
In kelvin: 685.65 K

Kelvin is Celsius plus 273.15. The unit line goes: its unit now follows the value.

Use the value as a number
Works below zero too
You're not logged in, so your progress is kept in this browser only. Log in to save it, and to use hints and solutions.

Hints

Methods find, count, replace and split

methods-find-replace-split.py
# Searching, counting, and splitting strings

# A snippet of mission log text
report = "Mars rover Curiosity landed. Curiosity is still active."

# .find() returns the index of the first match, or -1 if not found
position = report.find("Curiosity")
print("Curiosity first appears at index:", position)

missing = report.find("Voyager")
print("Voyager index:", missing)  # -1 means not found

# .count() returns how many times a substring appears
mentions = report.count("Curiosity")
print("Curiosity mentioned:", mentions, "times")

# .replace() can clean up or swap text - here we redact a name
public_report = report.replace("Curiosity", "[REDACTED]")
print(public_report)

# .split() breaks a string into a list, using a separator
crew_data = "Mark Watney,Botanist,Ares III,Sol 18"
fields = crew_data.split(",")
print("Fields:", fields)

# We can grab individual pieces by index
print("Name:", fields[0])
print("Role:", fields[1])

# Splitting on whitespace - no argument needed
sentence = "Houston we have a problem"
words = sentence.split()
print("Words:", words)
Open the full example
script.py
PythonLn 1, Col 1Spaces: 4
Loading the Python environment…

Separate arguments with commas. They're passed on every Run as sys.argv[1:].