You will write three small functions that a rocket planner might use.
The idea. The share of propellant is (propellant ÷ total mass) × 100 percent. A stage burns for propellant ÷ burn rate seconds. When a stage falls away, its mass is taken off the rocket.
Your tasks.
share, return the percent of the rocket's mass that is propellant.burn_time, return the seconds a stage burns.total_time, the list stages holds pairs (propellant, burn rate). Return the total burn time of all the stages, one after another.Run your code once to unlock the worked solution.
Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…