Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from random import choice
- animals = ["bear", "cow", "cat", "lion", "squirrel", "rat"]
- secret = choice(animals)
- def explain(what, hints):
- if secret == what:
- print(hints)
- explain("bear", "I can live in America in the forests.")
- explain("cow", "I eat grass. People like to eat me.")
- explain("cat", "People let me stay in houses. People like to play with me.")
- explain("lion", "I leave in the savana. I can eat zebras.")
- explain("squirrel", "There are lots of animals like me that live in Central Park. I live in trees.")
- explain("rat", "People hate me. There are a lot of animals like me at New York. People say that I am dirty.")
- def printguess():
- guess = input("What animal am I? ")
- guess.lower
- if secret in guess:
- print("That is right!")
- else:
- print("That is not right.")
- printguess()
- printguess()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement