> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/g/guess_the_number/with_feedback.md).

# With feedback

```ruby
var number = pick(1..10)
say "Guess the number between 1 and 10"
 
loop {
    given(var n = read("> ", Number).to_i) {
        when (number)     { say "You guessed it."; break }
        case (n < number) { say "Too low" }
        default           { say "Too high" }
    }
}
```
