Advertisement
Mofeoluwa

Untitled

May 7th, 2020
271
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. class Clothing():
  2.     def wear(self):
  3.         return "I'm wearing this fashionable piece of clothing!"
  4.     def sell(self):
  5.         return "Buy my piece of clothing"
  6. class Socks(Clothing):
  7.     def lose_one(self):
  8.         return "Where did my other one go?"
  9.     def wear(self):
  10.         return "Take a look at my socks! They're gorgeous!"
  11.     def sell(self):
  12.         return "Buy my socks!"
  13.  
  14. '''Test Case'''
  15. clean_socks = Socks()
  16. print(clean_socks.wear())
  17. print(clean_socks.lose_one())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement