dak0tah

HH Game

Sep 15th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.77 KB | None | 0 0
  1. class fruit:
  2.  
  3.    def __init__(self, name, froo, item, location):
  4.       self.name = name
  5.       self.froo = froo
  6.       self.item = item
  7.       self.location = location
  8.    
  9.    def describe(self):
  10.      print self.name +" the "+ self.froo +" is carrying a "
  11.      print self.item +" "+ self.location +"!"
  12.  
  13.  
  14.        
  15. q=raw_input("what is your name, child?")
  16.  
  17. def askfruit():
  18.     w=raw_input("what kind of fruit are you, " +q+ "?")
  19.     if w== "apple":
  20.         return True
  21.     elif w== "mango":
  22.         return True
  23.     elif w== "blueberry":
  24.         return True
  25.     else:
  26.         return False
  27.         print"That is simply unacceptable"
  28. askfruit()
  29.  
  30. e=raw_input("what are you carrying, " +q+ "?")
  31. r="on the beginning of their adventure"
  32.  
  33. player=fruit(q,w,e,r)
  34. player.describe()
Advertisement
Add Comment
Please, Sign In to add comment