Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Parrot:
- def __init__(self, name, age):
- self.name = name
- self.age = age
- def sing(self, song):
- return "{} sings {}".format(self.name, song)
- def dance(self):
- return "{} is now dancing".format(self.name)
- blu = Parrot("Blu", 10)
- print(blu.sing("'happy'"))
- print(blu.dance())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement