Question: Although not emphasized in the lecture videos, methods can also be protected like attributes. To do that you add the double underscore to the front

Although not emphasized in the lecture videos, methods can also be protected like attributes. To do that you add the double underscore to the front of the name of the method. The method is then considered to be
"private" and only used by other methods in the class. Assume you have a method in your class called "isQualified", you can run it within your class by issuing
self.isQualified (s_obj)
# note that 'self is not needed in the parameter list
If we wanted to protect "isQualified" we would define it using the signature line "def__isQualified (self, s_obj):" and execute it internally using the statement "self. _isQualified (s_obj".
Check 'True' for this question to get full credit. This question is not a trick, so don't over-think the answer. Just check 'True.
True
O FalseAlthough not emphasized in the lecture videos, methods can also be protected like attributes. To do that you add the double underscore to the front of the name of the method. The method is then considered to be
"private" and only used by other methods in the class. Assume you have a method in your class called "isQualified", you can run it within your class by issuing
self.isQualified (s_obj)
# note that 'self is not needed in the parameter list
If we wanted to protect "isQualified" we would define it using the signature line "def__isQualified (self, s_obj):" and execute it internally using the statement "self. _isQualified (s_obj".
Check 'True' for this question to get full credit. This question is not a trick, so don't over-think the answer. Just check 'True.
True
O False

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!