Question: Your Task Write a function called EstimateLaunchCost that takes the following inputs ( in order ) : - rocket _ weight ( in kg )
Your Task
Write a function called EstimateLaunchCost that takes the following inputs in order:
rocketweight in kg: The rocket's base weight. This doees not include the payload.
fueltype: A string specifying the fuel type Standard or "HighEfficiency" String comparisons are very picky; an extra space, a small typo, or a capital letter can cause your string comparison to fail. Please use the strings provided in the function template.
distance in km: Total mission distance.
numstages: The number of rocket stages involved in the launch.
payloadweight in kg: The weight of the payload carried by the rocket.
The function should output two values:
Total Launch Cost first output: The total estimated cost of the rocket launch.
Cost per Kilometer second output: The average cost per kilometer traveled.
Use the following information to write your EstimateLaunchCost function.
Base Cost per mathrm~km:
For distances less than km the base cost is $ per km
For distances greater than or equal to km the base cost is $ per km
Weight Surcharge:
If the rocket weight exceeds mathrm~kg an additional surcharge of $ is added.
Stage Cost:
Each rocket stage adds $ to the total cost.
Payload Cost:
The cost of transporting the payload is $ per kilogram.
Fuel Consumption:
Standard Fuel: Fuel cost of $ per km
HighEfficiency Fuel: Fuel cost of $ per km
The "default values" mentioned in the tests for this problem are:
rocketweight mathrm~kg
payloadweight mathrm~kg
distance mathrm~km
numstages
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
