PYTHON TF MULTI CHOICE 1) A specific Python list object must contain elements wh
ID: 3738437 • Letter: P
Question
PYTHON TF MULTI CHOICE
1) A specific Python list object must contain elements which are all of the same type (i.e., all floats or all strings, or all Students, etc.).
2) When an object reference is passed as a parameter to a method, modifying the members of that object from inside the method will result in a change to that object as seen from the client.
3) Which of the following statements are true?
(check all the are true)
Each instance of a class has its own set of data attributes.
A class is code that specifies the data attributes and methods for a particular type of object.
The _ _init_ _ method is usually the last method inside a class definition.
Mutator methods are sometimes called “getter,” and accessor methods are sometimes called “setters.”
Starting an attribute name with two underscores will hide the attribute from code outside the class.
You cannot directly call the _ _str_ _ method.
TrueExplanation / Answer
1) A specific Python list object must contain elements which are all of the same type (i.e., all floats or all strings, or all Students, etc.).
Answer:
False
2) When an object reference is passed as a parameter to a method, modifying the members of that object from inside the method will result in a change to that object as seen from the client.
Answer: True
3) Which of the following statements are true?
Answer:
A class is code that specifies the data attributes and methods for a particular type of object
Starting an attribute name with two underscores will hide the attribute from code outside the class.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.