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 (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
abhijeetf
2 weeks, 2 days ago
Selected Answer: AC
A & C is correct answer
upvoted 1 times
...
jarun2024
5 months ago
A & C is correct answer
upvoted 2 times
...
kino_1994
5 months, 2 weeks ago
A and C are correct.
upvoted 1 times
...
JeyTlenJey
6 months, 1 week ago
To list all attributes: print(dir(A)), a function get is at the end
upvoted 1 times
...
JeyTlenJey
6 months, 1 week 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 3 times
...
DKAT2023
6 months, 3 weeks ago
Selected Answer: A
sorry , only A is correct
upvoted 1 times
...
DKAT2023
6 months, 3 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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago