+ 10
The previous and this code are not very clear to me and I do not understand the attempts to modify it. What are the "colors"?
3 Respuestas
+ 5
A class is an attempt to create reusable code. If you are creating a program about different kinds of dogs, you don’t want to have to retype the same code over and over again. Instead you create a class, Dog, and each dog you need to make can inherit from that class.
+ 2
So I am made some amendments to your code - hope it is clearer now:
https://code.sololearn.com/cNsvZLMDhScA/?ref=app
+ 1
What’s in black variable?
And what don’t you exactly understand?