Question: How do I do this? Please explain each step In the file solar_system_weight.py, write a function called weight_on. The function should have two parameters, a
How do I do this? Please explain each step

In the file solar_system_weight.py, write a function called weight_on. The function should have two parameters, a string and a number, you can choose their names. The string represents a planet name, and the number represents a weight (assumed to be on earth). The function should produce a number representing the weight on the given planet, using the following values as the relative weights: "earth": 1.0 "mars": 0.38 "venus": 0.91 "mercury": 0.38 If a value other than one of these strings is given for the planet name, return -1. Examples: >>> weight_on("mars", 100) 38.0 >>> weight_on("sun", 100) -1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
