- 1
What are the problems in these codes?
def multi(a,b): return a*b def t(z,a,b): return z(z(a,b)) c=4 d=5 print(t(multi,c,d))
2 Antworten
+ 1
'multi' function expect two arguments, but outer call of 'z' ('multi') inside 't' function only use one (return value of z(a,b)) ^^
+ 1
return z(z(a, b))
This line contains the error. Notice first z() function takes two input but second z() function takes one. And you pass multi() function which doesn't handle variable parameters. So you need to fix that.