Docstoc

What Animal Is That (WAIT)

Document Sample
What Animal Is That (WAIT) Powered By Docstoc
					2005/2                                                                                  COMP1100



What Animal Is That?
Scenario
The program asks the player to think if an animal, then asks questions to decide what animal
the player thought of. The player should answer each question with either yes or no.
After asking the questions, the program guesses which animal the player thought of.
The animal to be found is a type of animal.
  That is, the program may guess dog, the name a type of animal, but may not guess Fido,
  the name of a particular dog.

Example of a session:

Welcome to What Animal Is That?
Think of an animal.
Answer the following questions with yes or no.
Is the animal large? yes
Is the animal grey? yes
Is the animal wrinkled? yes
My guess is: elephant


Example of another session:

Welcome to What Animal Is That?
Think of an animal.
Answer the following questions with yes or no.
Is the animal large? no
Is the animal small? yes
Is the animal white? yes
Is the animal smooth? yes
My guess is: mouse




carol@cs                               Page 1 of 3                         WAIT Quiz Solution Notes
2005/2                                                                COMP1100



WAIT (What Animal Is That?) Quiz

a)   What is the Welcome message?

           Welcome to What Animal Is That?



b)   What are the instructions?

           Think of an animal.

           Answer the following questions with yes or no.



c)   What are the questions in the sessions on Page 1?

           Is the animal large?

           Is the animal grey?

           Is the animal wrinkled?

           Is the animal small?

           Is the animal white?

           Is the animal smooth?



d)   How many questions does the program need to ask?

           It depends on the algorithm used.




carol@cs                              Page 2 of 3        WAIT Quiz Solution Notes
2005/2                                                                          COMP1100




Student:   I think that the answer to d) is three.
Carol:     The second session above asks four questions.
Student:   I mean that the minimum number of questions is three.
Carol:     What about:
           Welcome to What Animal Is That?
           Think of an animal.
           Answer the following questions with yes or no.
           Is the animal large? yes
           Is the animal blue? yes
           My guess is: whale




carol@cs                                 Page 3 of 3               WAIT Quiz Solution Notes

				
DOCUMENT INFO
Shared By:
Categories:
Stats:
views:3
posted:3/30/2010
language:English
pages:3
Description: What Animal Is That (WAIT)