input: Write a function to determine if a number is prime and then use it to print all prime numbers up to a given number n. If the number is less than 2, return an empty list.
  def is_prime(num):
      if num < 2:
          return False
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def print_primes_up_to_n(n):
      if n < 2:
          return []
      for num in range(2, n + 1):
          if is_prime(num):
              print(num)
  
  assert print_primes_up_to_n(10) == None
  assert print_primes_up_to_n(1) == []
  assert print_primes_up_to_n(0) == []
output: def print_primes_up_to_n(n):
      if n < 2:
          return []
      primes = []
      for num in range(2, n + 1):
          if is_prime(num):
              primes.append(num)
      return primes