 I was wondering if the adding the variable force here is redundant and could be excluded with no effect to how it functions? This the solution that was given by the professional in the get help but from my noobie perspective it seems redundant.

def get_force(mass, acceleration):
return mass*acceleration

def get_work(mass, acceleration, distance):
force = get_force(mass, acceleration) #if this line is excluded cant the line below
return force * distance #just be replaced with return get_force * distance
#since that function is already defined and returned

train_work = get_work(train_mass, train_acceleration, train_distance)

print("The GE train does " + str(train_work) + “Joules of work over " + str(train_distance) + ’ meters.”)

I think in this example it can. It might just be a pedagogical step to make the process very clear to students (someone correct me if I’m wrong)

Also, small detail is you would have to have to format your return response with the parameters of the function.

Yes, so this would not be sufficient:

``````  return get_force * distance
``````

We would actually need to call the `get_force` function, as follows:

``````  return get_force(mass, acceleration) * distance
``````