Last active
February 4, 2023 10:10
-
-
Save ustropo/d9a277584f89c1d48b7346419449872b to your computer and use it in GitHub Desktop.
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 Dog(object): | |
def init(self, name): | |
self.name = name | |
def bark(self): | |
print("Wooof! " + self.name) | |
def walk(self): | |
print("Hey! I'm walking!") | |
d = Dog() | |
d.init("rex") | |
d.bark() | |
d.walk() | |
## >> Output: | |
# Wooof! rex | |
# Hey! I'm walking! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment