input() returns text
The station's logistics tool asks how many people are on board and works out the crew after the next docking. Whatever number you type, it crashes.
Predict what happens, find out why input() is behind it, fix it, then write a packing tool that reads two numbers.
Finish stage 1 to unlock this stage.
Don't run the code yet. Read it and decide what it will print. 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.
When you run it, the program asks for the crew on board: type 4. What will it print then?
This program crashes, and a program that crashes can't be checked. After you run it and see what happens, put a # in front of the print line, then check: you'll see your prediction next to what the original line did with 4.
Finish stage 1 to unlock this stage.
Investigate. Store the type that input() gives in input_type. Then find out what crew + "1" gives when you type 4, and store it as text in text_sum. Run print(crew + "1") to check, and remove that line before you check.
Modify. Fix the program with int(), so that for 4 it prints:
Crew after docking: 5
You can convert where the crew count is read or where it is used. Either works.
Finish stage 2 to unlock this stage.
The supply ship's loadmaster needs a quick packing tool. Ask for the crew size, then the mission length in days, both whole numbers, and print the meals and water to pack: 3 meals and 2.5 litres of drinking water per person per day. For 4 crew and 7 days:
Meals to pack: 84 Water to pack: 70.0 l
Hints
Type Conversion
# Telemetry always arrives as text, even when it looks like a number
impact_speed_text = "22530"
orbit_change_text = "32.0"
# int() turns a string of digits into a whole number
impact_speed = int(impact_speed_text)
print("DART hit Dimorphos at", impact_speed, "km/h")
print("That is", round(impact_speed / 3600, 2), "km every second")
# float() does the same job for a decimal
orbit_change = float(orbit_change_text)
print("Orbit shortened by", orbit_change, "minutes")
# str() goes the other way. Plus only joins text to text
year = 2022
print("Impact year: " + str(year))
# print("Impact year: " + year) # delete the hash sign to meet a type error
# int() on a decimal chops off the fraction, it does not round
hours_per_orbit = 11.92
print("int gives", int(hours_per_orbit), "but round gives", round(hours_per_orbit))
# A decimal hiding inside a string needs float() first
raw = "11.92"
print("Converted safely:", int(float(raw)))
# print(int(raw)) # this one raises a value error
# type() confirms what you are actually holding
print(type(impact_speed_text), type(impact_speed), type(orbit_change))
Separate arguments with commas. They're passed on every Run as sys.argv[1:].