Created
November 13, 2020 13:37
-
-
Save betterdatascience/6d03085f9ca34b4e0643bf2369839401 to your computer and use it in GitHub Desktop.
005_oop
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class BMW(Car): | |
def __init__(self, year, color, plate): | |
super().__init__(brand='BMW', color=color, plate=plate) | |
self.year = year | |
bmw = BMW(year=2018, color='Red', plate='ABCD-123') | |
print(bmw) | |
print(bmw.start()) | |
print(bmw.stop()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment