Question: Function Name: timeDilationCalculator ( ) Parameters: planetNames ( list ) , planetDetails ( list ) Returns: dilationCalculations ( list ) Description: Cooper, a trained NASA

Function Name: timeDilationCalculator()
Parameters: planetNames ( list ), planetDetails ( list )
Returns: dilationCalculations ( list )
Description: Cooper, a trained NASA pilot, and the other astronauts are deciding which planet to
investigate, but they must do some calculations first.
You are tasked with creating a time dilation calculator that takes two lists: names of planets, and
lists of their corresponding details in the format [orbit_speed, gravitiational_force]. If a planet
has a gravitational force larger than 20, then you must print the string "{planetName }'s gravita-
tional force is too strong." and omit it from further calculations and lists. Then, you must print
out the name of the planet with the lowest time dilation in a string formatted as "The lowest dila-
tion is {planet_name}. Finally, return a sorted list of strings containing in the format of "
{planet}: {dilation}", with all calculations rounded to two decimal places.
Note: To calculate a planet's time dilation, you must divide its orbiting speed by the cube of its
gravitational force.\gg> planetDetails =[[101266.2738,19.3],[90091.13,21.6],[68154.88,8.13]]
$> timeDilationCalculator(planetNames, planetDetails)
LHS 1140 b's gravitational force is too strong.
The lowest dilation is Kepler-22b.
['HD 209458b: 126.83', 'Kepler-22b: 14.09']
> planetNames =["Proxima Centauri b", "WASP-12b", "TRAPPIST-1e","G]1214b"][22511.88,15.25],[66244.74,12.7]]
> timeDilationCalculator(planetNames, planetDetails)
Proxima Centauri b's gravitational force is too strong.
The lowest dilation is TRAPPIST-1e.
['G]1214b: 32.34', 'TRAPPIST-1e: 6.35', 'WASP-12b: 150.69']
Function Name: timeDilationCalculator ( )

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!