Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam PCAP All Questions

View all questions & answers for the PCAP exam

Exam PCAP topic 1 question 109 discussion

Actual exam question from Python Institute's PCAP
Question #: 109
Topic #: 1
[All PCAP Questions]

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

  • A. b() == 4
  • B. a != b
  • C. a is not None
  • D. a() == 4
Show Suggested Answer Hide Answer
Suggested Answer: BC 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
macxsz
Highly Voted 2 years, 6 months ago
Selected Answer: BC
B. a != b C. a is not None
upvoted 5 times
...
Damon54
Most Recent 9 months, 3 weeks ago
Example Closure , def f(x, y): nom, denom = x, y def g(): return nom / denom return g a = f(1, 2) b = f(3, 4) fun1 = a fun2 = b print(fun1()) print(fun2())
upvoted 1 times
...
seaverick
10 months ago
Selected Answer: BC
def f(x,y): nom,denom = x,y def g(): return nom/denom return g a=f(1,2) b=f(3,4) print(a is not None) print(a!=b) print(a() == 4) print(b() == 4) B,C
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...