#user_input_a_number_inside_a_loop
import random
import sys
import os

status = "stay_in_loop"  #change to "done" when appropriate

while(status == "stay_in_loop"):

    #prompt the user to enter  a number between 10 and 22
    print("\nEnter a number between 10 and 22 : ", end="")
    
    #get value from user
    num_in_str = sys.stdin.readline()

    #to remove the trailing "\n",  use rstrip()
    num_in_str = num_in_str.rstrip()
    print("\nYou entered : ",num_in_str,"\n")

    num_in = int(num_in_str)

    if (num_in >= 22) :
        print ("The number you entered is not less than 22 !  Try again.")
    else:
        if (num_in <= 10):
            print("The number you entered is not greater than 10! Try again.")
        else :
            #getting to here means the number was not greater than 22
            # and was not less than 10, so it must be a desired number
            status = "done"  #loop will end because status is no longer "stay_in_loop"

#loop has been exited, user has entered desired number
print ("Great!   Your number was between 10 and 22\n")
   
    
                  
      
