A child class gives a new value to a class variable of its parent, and adds nothing else.
class Shape:
sides = 0
def name(self):
return "shape"
class Triangle(Shape):
sides = 3
t = Triangle()
Which of these give True? Choose every correct option.
One or more options are correct. Tick all the correct ones: a wrong option costs marks, and a part-right answer earns part of the marks.