0

Python challenge question to explain

Can someone explain it to me, please? def f(x): return g(x) + 3 % 2 def g(x): return x**2 + 2 print(f(g(1))) result: 12 What's happening here step by step to get the result?

29th May 2018, 9:03 PM
Pav
2 Answers
+ 3
g(1) = 3 3 % 2 = 1 g(3) = 11 f(3) = g(3) + 1 = 12
29th May 2018, 9:38 PM
Fery Ardiansyah
Fery Ardiansyah - avatar
0
Thank you but the order of those functions is really confusing.
29th May 2018, 10:38 PM
Pav