The Task

Convert the dinosaur guessing game so the user (human) plays the role of the dinosaur on the left. That is, you will provide the range of numbers and your program will guess your number if you correctly answer the yes or no questions. Create a project in the studio University of Idaho CS112S18 A4. Use your Scratch username from assignment 1.

In class we developed a narrative of two dinosaurs playing the "I'm thinking of a Number" game. Both sides of the game were displayed in a dialog and the programming style used broadcast messages. This time, DO NOT use any broadcast messages and only one sprite to implements the right side of the guessing game. Implement these features:

  1. Pick a sprite of your choice for the "dinosaur" (it doesn't have to be a dinosaur). You can even draw your own or take a picture but your sprite should have at least two different costumes.
  2. Pick a background.
  3. Size your sprite at initialization to be an appropriate size for the background.
  4. Your sprite ("dinosaur") should begin by stating that the user should think of a secret number that is a positive integer.
  5. Your sprite should then ask what is the minimum you secret number could be and then ask what is the maximum it could be. This is how the sprite finds out the range of numbers to search.
  6. The sprite should use the same "divide and conquer" strategy used in the program in class. Your sprite should ask "Is your number greater than guess" where guess is a number computed to divide or nearly divide the range of numbers in half. The guess should be an integer. NOTE: this question is not exactly the same as in class!
  7. The sprite will wait for an answer that must be either "Y" or "N". Then it will compute a new guess and continue this way.
  8. The sprite must detect if it knows the user's secret number. Then it should say exactly: "I know your secret number! It is" and then put in the guess. where guess is the number the sprite thinks is the user's secret. Please keep displaying this message.
  9. Your sprite should dance or there should be some kind of victory show.
  10. Your sprite should switch costume at least once before it gets to the victory show.
  11. As always, do not remix or use someone else's code. You can look at the code we discussed in class.

The above is the minimum. You will be graded on satisfying that. However, feel free to add to the script as you like as long as it clearly does the above things in a way that the grader can easily see.

REMINDER: the assignment is due by 5pm on the due date! Assignments after 5pm will be worth zero. As always, there are no late assignments. Always turn something in even if it doesn't work. You can get partial credit.

Submission

This project must appear in the Studio by the due date/time. The studio will close for modification after that.