input: Write a function to rewrite the code snippet for finding prime numbers using Python. The function should define a helper function `is_prime` to check if a number is prime and then use this helper function to print all prime numbers from 2 to `n`.
  assert is_prime(5)==True
  assert is_prime(4)==False
  assert is_prime(17)==True
  assert is_prime(25)==False
  assert is_prime(2)==True
  assert is_prime(1)==False
output: def is_prime(num):
      if num <= 1:
          return False
      for i in range(2, int(num**0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def find_primes(n):
      for i in range(2, n + 1):
          if is_prime(i):
              print(i)