input: Write a function to determine if the given number is a prime number and print all prime numbers up to the given number n. The function should include an external helper function to check if a number is prime.
  
  def is_prime(num):
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def find_primes(n):
      for num in range(2, n + 1):
          if is_prime(num):
              print(num)
  
  assert find_primes(10)==2, 3, 5, 7
  assert find_primes(20)==2, 3, 5, 7, 11, 13, 17, 19
  assert find_primes(5)==2, 3, 5
output: def find_primes(n):
      for num in range(2, n + 1):
          if is_prime(num):
              print(num)