Page 45 -
P. 45
give a hint
I don‛t get it. How am I
supposed to guess the winning
number? All the program tells
me is that my guess is right or
wrong. Come on, give me some
help here!
The program needs to do more.
At the moment, the guessing game tells the user whether his
guess is right or wrong, but nothing more than that. It might
be more helpful if the program displayed more informative
messages, such as whether the guess is higher or lower than
the correct answer. That would help the user to hone in on the
right answer the next time the program is run.
We can do this by changing the code. But in what way?
One of your users
We need this program
to display messages that
are more informative.
10 Chapter 1