input: Write a function to determine if a given number is prime and print all prime numbers up to a specified number using Python. The function should take an integer as input and print all prime numbers from 2 to that integer.
  def print_primes(n):
      def is_prime(num):
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True
      
      for number in range(2, n + 1):
          if is_prime(number):
              print(number)
  
  assert print_primes(10)==None
  assert print_primes(20)==None
  assert print_primes(5)==None
  assert print_primes(1)==None
  assert print_primes(0)==None
output: def print_primes(n):
      def is_prime(num):
          for i in range(2, int(num ** 0.5) + 1):
              if num % i == 0:
                  return False
          return True
      
      for number in range(2, n + 1):
          if is_prime(number):
              print(number)