exam questions

Exam PCAP-31-03 All Questions

View all questions & answers for the PCAP-31-03 exam

Exam PCAP-31-03 topic 1 question 74 discussion

Actual exam question from Python Institute's PCAP-31-03
Question #: 74
Topic #: 1
[All PCAP-31-03 Questions]

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

  • A. a() > 2
  • B. a is not None
  • C. b() > 2
  • D. a is b
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

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
rahulgcp87
1 month ago
Selected Answer: BC
It depends at what step is a() is executed. If a() is run after invoking b=f(), then both a() and b() return 3 and in that case A,B and C are correct. But if a() is run before invoking b=f(), then a() returns 2 and b() returns 3 and in this case B and C are correct.
upvoted 1 times
...
flthymcnsty
2 months, 1 week ago
C is correct in addition to A & B. Tested
upvoted 2 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago