Guess the number

var n = pick(1..10)
print 'Guess the number: '
while (n != read(Number).int) {
    print 'Wrong! Guess again: '
}
say 'Well guessed!'