w_hours in second def
Why you used the w_hours in the second def and return this def with full syntax (wage (w_hours))?
I spent more than 30 minutes here to understand this move, it would very helpful if your share more resources for this
Thanks for reaching out.
In the second function
with_bonus() the argument w_hours can be with another name. But the important part is that this argument should be the same as in the inner function. Example:
return wage(worked_h) + 50
So, these two arguments are different from the first and the second function. The important part is that the second function and its inner function should have the same argument. The idea of using an inner function is to reuse the calculation of the first function. This is very useful.
Hope this helps.
I got your point, like the below code:
def turki (w_weeks):
return w_weeks * 25
def jana (w_weeksA):
return turki (w_weeksA) + 50
print (turki (8) , jana (8))