Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Thread Tools Display Modes
Prev Previous Post   Next Post Next
HiLo game
Posts: n/a
Default HiLo game - 12-10-2008, 08:32 PM

I have students writing a simple HiLo game where they generate a random number from 1 to 100 and then some object tries to guess it. Sometimes when the guess is equal to the number and the two are compared in a while loop (while guess != number) the loop keeps going and the bject says too high or too low. How can I remedy this situation?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright ©2022, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.