Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class fruit:
- def __init__(self, name, froo, item, location):
- self.name = name
- self.froo = froo
- self.item = item
- self.location = location
- def describe(self):
- print self.name +" the "+ self.froo +" is carrying a "
- print self.item +" "+ self.location +"!"
- q=raw_input("what is your name, child?")
- def askfruit():
- w=raw_input("what kind of fruit are you, " +q+ "?")
- if w== "apple":
- return True
- elif w== "mango":
- return True
- elif w== "blueberry":
- return True
- else:
- return False
- print"That is simply unacceptable"
- askfruit()
- e=raw_input("what are you carrying, " +q+ "?")
- r="on the beginning of their adventure"
- player=fruit(q,w,e,r)
- player.describe()
Advertisement
Add Comment
Please, Sign In to add comment