class animal:
def __init__(self,name,tag):
self.name = name
self.tag = tag
def build(self):
return f"{self.name} is a {self.tag}"
class insect(animal):
pass
animal1 = animal("Cow","4 legs,2 horns")
insect1 = insect("Spyder","8legs, small sized")
animal1.build()
insect1.build()
after implementing this script I am not getting any output please check it. but instead of return if given print function the output is shown
print("foo"), you print "foo", and if youreturn "foo", you return "foo". what do you want to do? alternatively, you could doprint(animal1.build())to get the same effect as printing from within you function