SHARE
TWEET

Untitled

a guest Mar 23rd, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Parrot:
  2.   def __init__(self, name, age):
  3.     self.name = name
  4.     self.age = age
  5.   def sing(self, song):
  6.     return "{} sings {}".format(self.name, song)
  7.   def dance(self):
  8.     return "{} is now dancing".format(self.name)
  9. blu = Parrot("Blu", 10)
  10. print(blu.sing("'happy'"))
  11. print(blu.dance())
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top