Question

Consider the following Python code: class Shape:     def area(self):         return 0 class Circle(Shape):     def __ init __ (self, radius):         self.radius = radius     def area(self):         return 3.14 * self.radius * self.radius s = Shape() c = Circle(5) print(s.area()) print(c.area()) What is the output of this code?

A 0 followed by 78.5
B 0 followed by 0
C 78.5 followed by 78.5
D None followed by 78.5
E Throws an error due to missing area method in Shape
Practice Next

Hey! Ask a query