I’m having issues with the exercise “Getting Ready For Physics Class”.
Here is the question:
Define a final function called
get_workthat takes in
distanceWork is defined as force multiplied by distance. First, get the
get_force, then multiply that by
distance. Return the result.
get_workby using it on
train_distance. Save the result to a variable called
Here is my code:
def get_work(mass, acceleration, distance): force = get_force() * distance return force train_work = get_work(train_mass, train_acceleration, train_distance)
However it is returning this error message:
Traceback (most recent call last): File "script.py", line 39, in <module> train_work = get_work(train_mass, train_acceleration, train_distance) File "script.py", line 36, in get_work force = get_force() * distance TypeError: get_force() missing 2 required positional arguments: 'mass' and 'acceleration'
I thought I had to define my arguments within my functions but the error message is telling me otherwise. Not sure what it could be.
Code from whole exercise: