Select true statements about class attributes and instance attributes. (select two)
Select true statements about class attributes and instance attributes. (select two)
a. A class attribute is a variable that is defined in the __init__()
constructor using self and belongs to one and only one instance. This variable is only available in the scope of this instance.
b. A class attribute is a variable that is defined directly in the class and belongs to the class, not to a specific instance. A class attribute is shared by all instances of that class.
c. An instance attribute is a variable that is defined in the __init__()
constructor using self and belongs to one and only one instance. This variable is only available in the scope of this instance.
d. An instance attribute is a variable that is defined directly in the class and belongs to the class, not to a specific instance. A class attribute is shared by all instances of that class.
b. A class attribute is a variable that is defined directly in the class and belongs to the class, not to a specific instance. A class attribute is shared by all instances of that class.
c. An instance attribute is a variable that is defined in the __init__()
constructor using self and belongs to one and only one instance. This variable is only available in the scope of this instance.