input: Write a function to check if a given number is a prime number using Python and print all prime numbers from 2 to a specified number n using this function. 
  
  def is_prime(num):
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def print_primes(n):
      for i in range(2, n + 1):
          if is_prime(i):
              print(i)
  
  assert is_prime(2) == True
  assert is_prime(3) == True
  assert is_prime(4) == False
  assert is_prime(5) == True
  assert print_primes(10) == None
output: def is_prime(num):
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  def print_primes(n):
      for i in range(2, n + 1):
          if is_prime(i):
              print(i)