Exam PCAP All QuestionsBrowse all questions from this exam
Question 110

What is the expected output of the following code?

    Correct Answer: A

    A

Discussion
TheNetworkStudent

in the invocation of foo() in the example there's clearly an L and not a 1... Assuming it's supposed to be a 1: A is correct, if it's an L: D is correct.

macxszOption: A

answer: A. 3

AxiansPT

y(x) ????

swatiphadtareOption: D

I get exception for return y(X) statement

swatiphadtare

What kind of statement is y(x)? how does that work? can someone please explain?

Simdjen

y becomes 'lambda x: x*x' as stated in the print function. With x == 1 we will get lambda x: 1*1(1) + (1+1) = 3