input: Write a function to find and print all prime numbers from 2 to a given number `n` using the optimized method of checking divisibility up to the square root of the number. If `n` is less than 2, the function should print nothing.
  
  def find_primes(n):
      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)
  
  find_primes(20)
  assert find_primes(20) is None
  assert find_primes(0) is None
  assert find_primes(1) is None
output: def find_primes(n):
      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)