What is the output of the following code?

Category: PythonWhat is the output of the following code?
Editor">Editor Staff asked 2 years ago

What is the output of the following code?

def f(x):
return 3*x
def g(x):
return 4*x
print(f(g(2)))

a) Error
b) 8
c) 24 
d) 6

1 Answers
Editor">Editor Staff answered 2 years ago

Correct answer is c) 24