@@ -15,46 +15,34 @@ def __repr__(self):
1515
1616
1717class TwoLeggedAnimal (Animal ):
18+ number_of_legs = 2
19+
1820 def __init__ (self , color ):
1921 super ().__init__ (color )
20- self .number_of_legs = 2
2122
2223
2324class FourLeggedAnimal (Animal ):
25+ number_of_legs = 4
26+
2427 def __init__ (self , color ):
2528 super ().__init__ (color )
26- self .number_of_legs = 4
2729
2830
2931class ZeroLeggedAnimal (Animal ):
32+ number_of_legs = 0
33+
3034 def __init__ (self , color ):
3135 super ().__init__ (color )
32- self .number_of_legs = 0
3336
3437
3538class Wolf (FourLeggedAnimal ):
3639 """Class for creating 4-legged wolves of any color"""
3740
38- def __init__ (self , color ):
39- super ().__init__ (color )
40-
41-
4241class Sheep (FourLeggedAnimal ):
4342 """Class for creating 4-legged sheep of any color"""
4443
45- def __init__ (self , color ):
46- super ().__init__ (color )
47-
48-
4944class Snake (ZeroLeggedAnimal ):
5045 """Class for creating 0-legged snakes of any color"""
5146
52- def __init__ (self , color ):
53- super ().__init__ (color )
54-
55-
5647class Parrot (TwoLeggedAnimal ):
5748 """Class for creating 2-legged parrots of any color"""
58-
59- def __init__ (self , color ):
60- super ().__init__ (color )
0 commit comments