Created
April 1, 2018 09:31
-
-
Save liweinan/c85ee8cf4f0e96db6b12aae74db3fc2e 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(): | |
def __init__(self, name, age): | |
self.name = name | |
self.age = age | |
def sit(self): | |
print(self.name.title() + " is now sitting") | |
def roll_over(self): | |
print(self.name.title() + " is now rolling over") | |
myDog = Dog('Yanan', 12) | |
myDog.sit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment