+ 1
Can't understand def func what's he want I can't understand this...... How to solve this.....
3 Antworten
+ 8
In this it multiply 2 * 2 and then multiply it by 4 ao we get 14
First function run and it gave 4
Anothwr gave 4*4 which is 16
I hope you understand 💕💕
+ 6
Hmmm you are correct
+ 2
test function takes two arguments (func, arg)
inside test function, you are calling the "func" with "args", then passing the return value from that to "func" again.
In this case: this happens
test(mult, func)
-> mult(mult(2))
-> mult(4)
-> 16
Sort of like calling the function twice but second function argument is first function return value.