← Back to Question List
Python Code Walkthrough #44
The Parent Calls The Child
📄 Code
Read carefully — what does this print?1class Shape:2 def name(self) -> str:3 return "shape"45 def describe(self) -> str:6 return "I am a " + self.name()78class Circle(Shape):9 def name(self) -> str:10 return "circle"1112print(Shape().describe())13print(Circle().describe())14print(Circle().name())