def test(a, b, c):
def plus(d, e):
return d + e
r1 = plus(a, b)
r2 = plus(b, c)
print(r1 * r2)
test(3, 4, 5)
Execution result
63
For r1, the value obtained by adding 3 and 4 to the plus function is entered. Therefore, r1 = 7 For r2, the value obtained by adding 4 and 5 to the plus function is entered. Therefore, r2 = 9
Since the test function outputs the value obtained by multiplying r1 and r2, 63 is output as the execution result.
Recommended Posts