gibs7usa
04-12-2009, 07:43 PM
I am working on "An Introduction to Programming Using Alice" Exercise 10 on Page 151: Creating a Guessing Game world
I have to create a world that asks the user to guess a random number of the computer's choice. There are 2 characters in the world, one tells you if the number is too high and one tells you if the number is too low.
The computer should keep asking you to guess until you guess the correct number.
My problem is that it keeps asking me to guess a number even after I guess the correct number.
I have to set up a sentinel loop so this doesn't happen, but I can't figure out how. I have reviewed the book, but maybe I am putting the wrong thing inside the While Tile
Thanks!
I have to create a world that asks the user to guess a random number of the computer's choice. There are 2 characters in the world, one tells you if the number is too high and one tells you if the number is too low.
The computer should keep asking you to guess until you guess the correct number.
My problem is that it keeps asking me to guess a number even after I guess the correct number.
I have to set up a sentinel loop so this doesn't happen, but I can't figure out how. I have reviewed the book, but maybe I am putting the wrong thing inside the While Tile
Thanks!