input: Write a function to rewrite the provided code snippet to find prime numbers using Python. The function should iterate through numbers from 2 to a given number `n` and print out all the prime numbers in that range. If `n` is less than 2, the function should print a message indicating that there are no prime numbers in the range.
  def find_primes(n):
      if n < 2:
          print("There are no prime numbers in this range.")
          return
      
      def is_prime(num):
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True
      
      for number in range(2, n + 1):
          if is_prime(number):
              print(number)
  
  assert find_primes(10) == None # Should print: 2 3 5 7
  assert find_primes(2)  == None # Should print: 2
  assert find_primes(1)  == None # Should print: There are no prime numbers in this range.
  assert find_primes(0)  == None # Should print: There are no prime numbers in this range.
  assert find_primes(-5) == None # Should print: There are no prime numbers in this range.
output: def find_primes(n):
      if n < 2:
          print("There are no prime numbers in this range.")
          return
      
      def is_prime(num):
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True
      
      for number in range(2, n + 1):
          if is_prime(number):
              print(number)