Tank level
Every propellant tank on Python One reports two numbers: what it can hold and what's in it now. The crew doesn't want two numbers. They want to know how full the tank is.
Turn the readings into a percentage, then into the gauge the crew display shows.
Finish stage 1 to unlock this stage.
Work out how full tank B is and print it as a percentage with one decimal place:
Tank B: 73.4%
Divide what's in the tank by what it can hold, then multiply by 100.
Finish stage 1 to unlock this stage.
The crew display draws each tank as a gauge of 10 segments: one # for every full 10% and a - for the rest.
Tank B: [#######---] 73.4%
Work out how many full tens the percentage has, then repeat "#" that many times and "-" for the rest, as with the alert banner's "=" * 30. A text can only be repeated a whole number of times, so turn the count into an int.
Hints
Basic Math Operations
# Mission fuel calculation
fuel_total = 1000
fuel_used = 350
fuel_remaining = fuel_total - fuel_used
print("Remaining fuel:", fuel_remaining, "liters")
# Engine power output
engines = 4
power_per_engine = 250
total_power = engines * power_per_engine
print("Total power:", total_power, "kW")
# Average speed calculation
distance = 1000
time_hours = 4
speed = distance / time_hours
print("Speed:", speed, "km/h")
Separate arguments with commas. They're passed on every Run as sys.argv[1:].