PCAP-31-03 Exam QuestionsBrowse all questions from this exam

PCAP-31-03 Exam - Question 66


Assuming that the following code has been executed successfully, select the expressions which evaluate to True. (Choose two.)

Show Answer
Correct Answer: AB

After analyzing the provided code and the possible expressions, the correct answers are those that evaluate to True based on returning the inner function 'g' and the assignments 'a' and 'b'. The expression 'a(2) == 4' is True because 'a' becomes the function 'g', which squares its input (2*2). The expression 'a is not None' is also True because 'a' is assigned a function, not None. Therefore, the expressions 'a(2) == 4' and 'a is not None' are correct.

Discussion

1 comment
Sign in to comment
DKAT2023Options: AB
Jul 12, 2024

A and B are corrects