0

Write a function compose(t,u) ( like tou or (t(u(x))) in maths )

help .. Python

22nd Oct 2018, 6:17 PM
safae safa
safae safa - avatar
5 odpowiedzi
+ 2
Like this? def compose(t,u, x): o= u(x) return t(o)
22nd Oct 2018, 7:30 PM
KrOW
KrOW - avatar
+ 2
Gordie Yes... I didnt noticed
22nd Oct 2018, 8:21 PM
KrOW
KrOW - avatar
0
but in the last return . . i think we should return t(x) ??
22nd Oct 2018, 7:33 PM
safae safa
safae safa - avatar
0
Not... t get the output of u like input, and this is stored on "o" var 😉
22nd Oct 2018, 7:49 PM
KrOW
KrOW - avatar