Question: 2. Implement the following function in the PyDev module functions . py and test it from a PyDev module named to2. py: def get_weight (mass)

2. Implement the following function in the PyDev module functions . py and test it from a PyDev module named to2. py: def get_weight (mass) : Describes a mass in terms of its weight. If its weight is > 1000 N, it is "heavy", less than 10 N it is "light", and "average" otherwise. weight = mass (kg) x acceleration due to gravity (9.8/m/s*2) Use: weight, message = get_weight (mass) Parameters : mass - mass of an object in kg (float > 0) Returns: weight - weight of an object in Newtons (float) message - description of weight of object (str) Sample testing: Enter mass (kg) : 5 Weight: 49.0 N Object is: average Enter mass (kg) : 1 Weight : 9. 8 N Object is: light Test functions . py: Choose File No file chosen Submit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
