def get_input_number(message: str,
                     starting: int,
                     ending: int,
                     allow_no_input=False,):
  """
  Asks user for a value, ensures the value inserted is either an int or a float,
  and within the prescribed range

  :param message: str
  :param starting: int starting number
  :param ending: int ending number
  :param allow_no_input: bool | allows no input == ""
  :return float
  """
  
  while True:
    
    try:
      
      number = input(message)
      
      if allow_no_input: # exit if no input received
        if number == "":
          return
      
      # else try to convert to float
      number = float(number)
      
      if (number >= starting) and (number <= ending):
        break
      
      else:
        print(f"\nPlease input a number from {starting} and {ending}, "
              f"inclusive both")
        
    except ValueError:
      print("Invalid input. Please enter a number eg. 1 or 0.5. ")
  
  return number