Think about how you'd do it in normal conversation:
You: Pick a number
Me: 5
You: That's too low. Pick a number.
Me: 30
You: That's too high. Pick a number.
Me: 15
You: Ahhh. That's just right.
From that, you can see that "Pick a number" is repeated, the answer is received and evaluated, and a response is generated. If the response is evaluated as out of bounds, the "Pick a number" prompt is repeated. That repetition is what must occur inside the loop. In pseudo code:
theAnswerIsOutOfBounds = true
do
{
// pick a number
// evaluate the number and provide feedback
// if the number is okay, theAnswerIsOutOfBounds = false
} while ( theAnswerIsOutOfBounds )