Select a random number Get a guess from the user While the guess is incorrect if it's too high then print "Try lower..." if it's too low then print "Try higher..." Get another guess from the user print "Well done! You got it!"
Notice that I did not need to test the guess when I printed “Well done”. I didn’t need to “see” if the guess was right. I knew that if we had jumped out of the loop and were executing that last line, that the guess MUST be right.