input: Write a python function to print all prime numbers up to a given upper limit.
  assert is_prime(10) == "2 3 5 7 "
  assert is_prime(15) == "2 3 5 7 11 13 "
  assert is_prime(20) == "2 3 5 7 11 13 17 19 "
output: def is_prime(upper_limit):
      def is_prime_num(num):
          if num < 2:
              return False
          for i in range(2, int(num**0.5) + 1):
              if num % i == 0:
                  return False
          return True
  
      primes = [str(num) for num in range(2, upper_limit + 1) if is_prime_num(num)]
      return " ".join(primes) + " "