input: Write a function to print prime numbers up to a given number.
  assert print_prime_numbers(10)==[2, 3, 5, 7]
  assert print_prime_numbers(20)==[2, 3, 5, 7, 11, 13, 17, 19]
  assert print_prime_numbers(5)==[2, 3, 5]
output: def print_prime_numbers(n):
      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
      
      primes = []
      for i in range(2, n + 1):
          if is_prime(i):
              primes.append(i)
      return primes