input: def is_prime(num: int) -> bool:
      """ Check if a number is prime by iterating from 2 to the square root of the number.
      >>> is_prime(2)
      True
      >>> is_prime(4)
      False
      """
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def find_primes_up_to(n: int) -> None:
      """ Find and print all prime numbers up to a given number n by using the is_prime function.
      >>> find_primes_up_to(5)
      2
      3
      5
      """
      for number in range(2, n + 1):
          if is_prime(number):
              print(number)
output:     for number in range(2, n + 1):
          if is_prime(number):
              print(number)