Sam has created two classes: a parent class WaterBody and a child class River. Now he wants to create an instance for the river Seine (777 km). Unfortunately, he made some mistakes in the code. Your task is to find those mistakes and fix them.
Inheritance in Python
Something in the water
Report a typo
Write a program in Python 3
class WaterBody:
def __init__(self, name, length,):
self.name = name # str
self.length = length # int
class River{WaterBody}:
pass
seine = River()
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.