0
i don't get it, can someone explain me why the output is 12 ?
2 Respostas
+ 2
def f(x):
return g(x)+3%2
def g(x):
return x**2+2
print(f(g(1)))
g(1) = 1**2+2 = 3 ;now it passed to function f as f(3)
f(3) => g(3) + 3%2
=> 3**2 + 2 +1
=> 9+2 +1
=> 12
0
thanks a lot, i got it 😊