Question: what is wrong with my code. class Chicken: total _ eggs = 0 def _ _ init _ _ ( self , name, species )
what is wrong with my code. class Chicken:
totaleggs
def initself name, species:
self.name name
self.species species
self.eggs
def layeggself:
self.eggs
Chicken.totaleggs
return self.totaleggs
c Chickenname"Alice", species"Partridge Silkie"
c Chickenname"Amelia", species"Speckled Sussex"
printChickentotaleggs
clayegg
printChickentotaleggs
clayegg
clayegg
printChickentotaleggs
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
