Task

Write a game (computer program) that follows the following rules:

 The computer chooses a number between given set limits.
 The player is asked for repeated guesses until the the target number is guessed correctly
 At each guess, the computer responds with whether the guess is:
 higher than the target,
 equal to the target, 
 less than the target,   or
 the input was inappropriate. 


Related task

   Guess the number/With Feedback (Player)


function guesswithfeedback(n::Integer)
    number = rand(1:n)
    print("I choose a number between 1 and $n\nYour guess? ")
    while (guess = readline()) != dec(number)
        if all(isdigit, guess)
            print("Too ", parse(Int, guess) < number ? "small" : "big")
        else
            print("Enter an integer please")
        end
        print(", new guess? ")
    end
    println("You guessed right!")
end
 
guesswithfeedback(10)