👉🏻 Get 57% OFF 'The 365 Data Science Program': bit.ly/2WnHEfU
@91dgross3 жыл бұрын
If you analyze what’s going on, technically speaking, you are not using a function within a function. You are precisely using the same value associated with the parameter of the first function definition as the second function definition. That is not “using a function in a function”. If you were truly using a function within a function, in the second function call you would be able to say w_bonus(w_hours) as a way to pass the original value associated with parameter/variable “w_hours” found in the function defined as wage. But this would run an error of “w_hours” not being defined. So again, you are not actually using a function within a function, you are clearly passing the same value to both functions definitions in the function calls. And of course in the second function call you add 50. Not to be pedantic, but as a self learner it’s frustrating when educators lack the literalness in their thinking and their language (especially in a subject as comprehensive as this) to transmit concepts in a clear and accurate way. Technically speaking, as technicality is what I am concerned with in this kind of learning, this is NOT passing a function to another function. If that were the case, using the exact parameter from the first function definition would be all one would need to include as an argument/value in the second function call.
@thomasblacker1292 жыл бұрын
This is correct. It took me ages to realize that was the reason why my function variables kept coming up as 'undefined'.
@faisalshafiuddin1018 Жыл бұрын
i mean what he did is right but exaclty what i wanted then i realised what your saying exaclty what i was looking for. bascially like nested method function.
@harshkhanna1628 Жыл бұрын
True. Clickbait video
@mnageh-bo1mm Жыл бұрын
indeed
@theoguerrero29752 жыл бұрын
Thanks for your advice.
@kaarthik92 жыл бұрын
Thanks!
@mammon-sama884 Жыл бұрын
what if making the return statement ends up in a typeError unsupported operand type(s) for * or pov(): 'str' and 'int' ?
@ফকিরতালিব2 жыл бұрын
From the heading, I expected a function defined within the body of another function in this video. You did not do the same here!
@bamanjagadeesh81454 жыл бұрын
Very nice, can you please provide all this in a single pdf, it's helps us a lot