Py4e: Chapter 14- Questions and Answers|
100% Solved
What keyword is used to indicate the start of a method in a Python class? def
What is "self" typically used for in a Python method within a class? To refer to the
instance in which the method is being called
What does the Python dir() function show when we pass an object into it as a parameter?
It shows the methods and attributes of the object
Which of the following is rarely used in Object Oriented Programming? Destructor
class shape of an object, template (the cookie cutter) string
object also called an instance. the cookie to the cookie cutter, (behavior defined by the
class)
state the set of values of the attributes of a particular object.
method a verb; the object's abilities; the function inside the object. string.uppercase( )
list.append( )
100% Solved
What keyword is used to indicate the start of a method in a Python class? def
What is "self" typically used for in a Python method within a class? To refer to the
instance in which the method is being called
What does the Python dir() function show when we pass an object into it as a parameter?
It shows the methods and attributes of the object
Which of the following is rarely used in Object Oriented Programming? Destructor
class shape of an object, template (the cookie cutter) string
object also called an instance. the cookie to the cookie cutter, (behavior defined by the
class)
state the set of values of the attributes of a particular object.
method a verb; the object's abilities; the function inside the object. string.uppercase( )
list.append( )