input: Write a function to determine the prime numbers within a given range, rewriting the provided code snippet in Python. The function should iterate from 2 to the given number n and print all prime numbers within this range.
  assert is_prime(5) == True
  assert is_prime(10) == False
  assert is_prime(29) == True
  assert is_prime(1) == False
  assert is_prime(0) == False
output: def is_prime(n):
      if n <= 1:
          return False
      for i in range(2, int(n**0.5) + 1):
          if n % i == 0:
              return False
      return True