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):
- rocket_weight (in kg): The rocket's base weight. This doees not include the payload.
- fuel_type: A string specifying the fuel type ("Standard" or "High-Efficiency"). 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.
- num_stages: The number of rocket stages involved in the launch.
- payload_weight (in kg): The weight of the payload carried by the rocket.
The function should output two values:
1. Total Launch Cost (first output): The total estimated cost of the rocket launch.
2. Cost per Kilometer (second output): The average cost per kilometer traveled.
Use the following information to write your EstimateLaunchCost function.
1. Base Cost per \(100\mathrm{~km}: \)
- For distances less than 200 km , the base cost is \(\$ 1,200\) per 100 km .
- For distances greater than or equal to 200 km , the base cost is \(\$ 800\) per 100 km .
2. Weight Surcharge:
- If the rocket weight exceeds \(1,000\mathrm{~kg}\), an additional surcharge of \(\$ 5,000\) is added.
3. Stage Cost:
- Each rocket stage adds \(\$ 5,000\) to the total cost.
4. Payload Cost:
- The cost of transporting the payload is \(\$ 500\) per kilogram.
5. Fuel Consumption:
- Standard Fuel: Fuel cost of \(\$ 150\) per km.
- High-Efficiency Fuel: Fuel cost of \(\$ 120\) per km.
The "default values" mentioned in the tests for this problem are:
- rocket_weight \(=1200\mathrm{~kg}\)
- payload_weight \(=300\mathrm{~kg}\)
- distance \(=250\mathrm{~km}\)
- num_stages =2
Your Task Write a function called

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!