input: Write a python function to simulate a number guessing game where the function generates a random number between min and max, and the user has to guess it. The function should update the range after each guess.
  assert number_guessing_game(0, 100) is not None
  assert number_guessing_game(50, 150) is not None
  assert number_guessing_game(200, 300) is not None
output: import random
  
  def number_guessing_game(min, max):
      target = random.randint(min, max)
      attempts = 0
      
      while True:
          guess = int(input(f"Guess a number between {min} and {max}: "))
          attempts += 1
          
          if guess < min or guess > max:
              print("Your guess is out of the range. Try again.")
          elif guess < target:
              print("Too low! Try again.")
              min = guess + 1
          elif guess > target:
              print("Too high! Try again.")
              max = guess - 1
          else:
              print(f"Congratulations! You've guessed the number {target} in {attempts} attempts.")
              break