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

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

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 (?) , you can switch to a simple comment.
Switch to a voting comment New
macxsz
Highly Voted 2 years ago
Selected Answer: BC
B. a != b C. a is not None
upvoted 5 times
...
Damon54
Most Recent 2 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
3 months, 1 week 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 ...