0
Which are the 'object/s' in this example?
Taken from the OOP lesson: Below is an example of a simple class and its objects. class Cat: def __init__(self, color, legs): self.color = color self.legs = legs felix = Cat("ginger", 4) rover = Cat("dog-colored", 4) stumpy = Cat("brown", 3)
3 Respuestas
+ 3
You have the class Cat which is like a blueprint to create Cats. Your objects are felix, rover and stumpy.
https://www.sololearn.com/learn/JUMP_LINK__&&__Python__&&__JUMP_LINK/2467/?ref=app
+ 3
Clement Chiu You're welcome.
+ 1
Denise Roßberg thanks I had to have it clarified because the term 'objects' had been regularly used after this yet I was confused which were the objects