The Toolkit
class has four attributes:
hasHammer
(initialized to False)hasWrench
(initialized to False)hasPliers
(initialized to False)type
(set to the value of thetype
parameter during initialization)
So the correct response would be four.
class Toolkit():
def __init__(self, type):
self.hasHammer = False;
self.hasWrench = False;
self.hasPliers = False;
self.type = type;
abbiToolKit = Toolkit("metal")
print(abbiToolKit.hasHammer)
How many attributes does it have?
(1 point)
Responses
one
one
two
two
three
three
four
four
Skip to navigation
1 answer
The Toolkit
class has four attributes:
hasHammer
(initialized to False)hasWrench
(initialized to False)hasPliers
(initialized to False)type
(set to the value of the type
parameter during initialization)So the correct response would be four.