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 32 discussion

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

The first parameter of each method:

  • A. holds a reference to the currently processed object
  • B. is always set to None
  • C. is set to a unique random value
  • D. is set by the first argument's value
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

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
anjuvinayan
Highly Voted 4 years, 12 months ago
Answer is A. The first argument of every class method, including init, is always a reference to the current instance of the class. By convention, this argument is always named self. In the init method, self refers to the newly created object; in other class methods, it refers to the instance whose method was called
upvoted 29 times
...
peypa
Most Recent 8 months, 2 weeks ago
Answer is A. all method begin def method_name(self)
upvoted 1 times
...
Oracleist
9 months, 3 weeks ago
the question is ambiguous. parameter of functions are called actual for the invocation, formal for declaration.
upvoted 1 times
...
seaverick
10 months, 1 week ago
Selected Answer: A
The first argument of every class method, including init, is always a reference to the current instance of the class. By convention, this argument is always named self. In the init method, self refers to the newly created object; in other class methods, it refers to the instance whose method was called. https://yasoob.me/2013/08/07/the-self-variable-in-python-explained/
upvoted 1 times
...
34_trt
1 year, 2 months ago
Selected Answer: A
method usually means its related to class.
upvoted 1 times
...
[Removed]
1 year, 8 months ago
self in method is optional so D.
upvoted 2 times
...
ivanbicalho
1 year, 9 months ago
Selected Answer: A
Should be A: class MyClass: def my_method(self): print(self) MyClass().my_method() Result: <__main__.MyClass object at 0x104fd1dd0>
upvoted 1 times
...
Adeshina
1 year, 11 months ago
A. holds a reference to the currently processed object In Python, methods are functions that are defined inside a class and are associated with objects of that class. When a method is called on an object, the first parameter of the method holds a reference to the object on which the method is called, and is typically named self. This allows the method to access and modify the attributes and behavior of the object, as well as to call other methods on the same object.
upvoted 1 times
...
Jnanada
2 years, 3 months ago
A. holds a reference to the currently processed object
upvoted 2 times
...
macxsz
2 years, 6 months ago
Selected Answer: A
first parameter is self A. holds a reference to the currently processed object
upvoted 1 times
...
rocky48
2 years, 7 months ago
Selected Answer: A
Answer is A.
upvoted 1 times
...
mbacelar
2 years, 8 months ago
Selected Answer: A
A is the answer
upvoted 1 times
...
technoguy
3 years ago
Selected Answer: A
since first parameter is always self. which represent the object passed
upvoted 1 times
...
Spectra
4 years, 2 months ago
A is the answer
upvoted 2 times
PCAPaspirant
4 years, 1 month ago
Have you appeared for PCAP ? If yes can you please tell if these are exact questions coming in the exam ?
upvoted 4 times
PythonPuhal
3 years, 8 months ago
It is not from the PCAP
upvoted 1 times
aldo63
1 year, 9 months ago
What do you mean? These questions are supposed to appear in PCAP.
upvoted 1 times
...
...
...
...
imsaad
4 years, 3 months ago
should be A
upvoted 1 times
...
puneetk
4 years, 4 months ago
A is the right answer
upvoted 1 times
...
SophieSu
4 years, 11 months ago
Agree. Correct answer should be A
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 ...