I am trying to create a class about birds with a few different methods. This is just theoretical code. Is there anything that is inherently wrong with the code from a syntactical or semantics point of view? If so, please fix.
class Bird(object):
def __init__(self, Height, Weight, HasFeathers, CapableofFlying, BirdMigrates, BirdSings, BirdEatsworms):
self.Height=Height
self.Weight=Weight
self.HasFeathers=HasFeathers
self.HasFeathers= HasFeathers
self.CapableofFlying= getCapableofFlying
self.BirdMigrates=BirdMigrates
self.BirdSings=BirdSings
self.BirdEatsworms=BirdEatsworms
def Height():
return Height
def Weight():
return Weight
def HasFeathers():
if getHasFeathers=false:
return “The bird does not have feathers”
else:
return “The bird has feathers”
def CapableofFlying():
if CapableofFlying=false:
return “The bird is incapable of flying”
else:
return “The bird is capable of flying”
def BirdMigrates():
if BirdMigrates=false:
return “The bird does not migrate”
else:
return “The bird migrates”
def BirdSings():
if BirdSings=false:
return “The bird cannot sing”
else:
return “The bird can sing”
def BirdEatsworms():
if BirdEatsworms=false:
return “The bird does not eat worms”
else:
return “The bird eats worms”