PCAP Exam QuestionsBrowse all questions from this exam

PCAP Exam - Question 110


What is the expected output of the following code?

Show Answer
Correct Answer: A

A

Discussion

5 comments
Sign in to comment
TheNetworkStudent
Mar 5, 2022

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
May 4, 2022

answer: A. 3

swatiphadtare
Apr 4, 2023

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

Simdjen
Sep 27, 2023

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

swatiphadtareOption: D
May 6, 2023

I get exception for return y(X) statement

AxiansPT
Jul 13, 2023

y(x) ????