Your program should store its knowledge in a file so that it gets better at the "Guess My Animal" game as it plays more and more times. Here is an example run:
> animal "Guess My Animal" game by Seth Li. Please think of an animal. Press return when you are ready: Is your animal a cat? no I'm sorry, I don't know your animal. You win. What animal were you thinking of? dolphin Please enter a yes/no question which is true of a cat but not true of a dolphin: Does it purr? Thank you! > > animal "Guess My Animal" game by Seth Li. Please think of an animal. Press return when you are ready: Does it purr? no Is it a dolphin? no I'm sorry, I don't know your animal. You win. What animal were you thinking of? elephant Please enter a yes/no question which is true of a dolphin but not ture of a elephant: Does it swim? Thank you! > > animal "Guess My Animal" game by Seth Li. Please think of an animal. Press return when you are ready: Does it purr? no Does it swim? yes Is it a dolphin? yes I WIN!!!! >