Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
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 59 discussion

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

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

  • A. hasattr(B, 'get')
  • B. isinstance(obj_b,C)
  • C. obj_c.get() == 2
  • D. C._C__VarA == 2
Show Suggested Answer Hide Answer
Suggested Answer: AB 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
jarun2024
2 months, 3 weeks ago
A & C is correct answer
upvoted 1 times
...
kino_1994
3 months ago
A and C are correct.
upvoted 1 times
...
JeyTlenJey
4 months ago
To list all attributes: print(dir(A)), a function get is at the end
upvoted 1 times
...
JeyTlenJey
4 months ago
Selected Answer: AC
Correct: A, C print("A.", hasattr(B, 'get')) #True print("B.", isinstance(obj_b,C)) #False print("C.", obj_c.get(), obj_c.get() == 2) #True 2 print("D.", C._C__VarA, C._C__VarA == 2) #False, 3
upvoted 1 times
...
DKAT2023
4 months, 2 weeks ago
Selected Answer: A
sorry , only A is correct
upvoted 1 times
...
DKAT2023
4 months, 2 weeks ago
Selected Answer: AB
A and B are corrects
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 ...