What arrived?
Packets from the engine sensors don't always arrive in the shape you'd expect. Some numbers come as real numbers, some as text that only looks like a number, and one value says "False" in quotes. Before the flight computer can calculate anything, it has to know what it actually got.
type() tells you. Predict what it shows, investigate a whole packet, then convert one yourself.
Finish stage 1 to unlock this stage.
Don't run the code yet. Read it and decide what it will print on its first line. Write your guess in prediction, at the top, between the quotes. Then run it and compare.
Any guess passes this stage: the point is to think before you run. After you check, you'll see your prediction next to what Python printed.
type() prints a value's type as <class '...'>. Writing just the type name in your prediction is fine.
Finish stage 1 to unlock this stage.
Investigate. Find out what type float(temperature) gives and store it in converted_type. Then find out what bool(valve_open) gives, True or False, and store it in bool_of_valve. Run them to check, then remove any lines you added before you check.
Modify. Print the type of every value in the packet, one line each, following the pattern of the first two lines:
sensor_id: <class 'str'> temperature: <class 'str'> pressure: <class 'float'> valve_open: <class 'str'> sample_count: <class 'int'>
Finish stage 2 to unlock this stage.
Everything in this packet from the navigation computer arrived as text. Convert each value to the type it should have, into the new variables named in the comments, then print each new value and its type:
altitude_km: 408 <class 'int'> speed_kms: 7.66 <class 'float'> crew: 3 <class 'int'>
Hints
Basic Data Types
# Basic data types in Python
# int - whole numbers
number_of_planets = 8
print("Planets:", number_of_planets, type(number_of_planets))
# float - decimal numbers
deep_space_temp = -270.45
print("Temperature:", deep_space_temp, type(deep_space_temp))
# str - text (string)
galaxy = "Milky Way"
print("Galaxy:", galaxy, type(galaxy))
# bool - logical value
is_life_on_mars = False
print("Life on Mars:", is_life_on_mars, type(is_life_on_mars))
Separate arguments with commas. They're passed on every Run as sys.argv[1:].