Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Determine animal
- kinds = ["a Herbivore", "a Carnivore", "a Omnivore", "starving"]
- animal = raw_input("What animal? ")
- eatsMeat = raw_input("Does it eat meat? ").lower()
- eatsVegetables = raw_input("Does it eat vegetables? ").lower()
- if(eatsMeat.find("yes") != -1 and eatsVegetables.find("yes") != -1):
- kindOfAnimal = kinds[2]
- elif(eatsMeat.find("yes") != -1):
- kindOfAnimal = kinds[1]
- elif(eatsVegetables.find("yes") != -1):
- kindOfAnimal = kinds[0]
- else:
- kindOfAnimal = kinds[3]
- print "The " + animal + " is " + kindOfAnimal + '.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement