Homework 5
Home   Lectures   Solutions   Syllabus      Instructor's Site  
Homework 5 - Due Monday 5 March at 11:59pm.

(Hw5Ex1.a2w) Create an Alice "guessing game" world according to the instructions below. The world should have two characters of your choice. Hint: It might be best to create a flowchart or pseudo-code to help design your world. Save the world to the K drive.

  1. Pick a random number X, such that 1 ≤ X < 100. In the instruction to pick the random number, click "more" and select "integer only = true" so that the random number tile looks like this:
     

  2.  
  3. Ask the user to guess the number. Alice has a world level function to ask the user for a number.
  4.  
  5. Have one of the characters tell the user if the guess is too low. Have the other character tell the user if the guess is too high.
  6.  
  7. Set up a sentinel loop to repeat the process while the user's guess is not equal to the number the computer picked.
  8.  
  9. Have both characters tell the user when the guess is correct and react, such as with a dance.