input: Write a function to check if a given number is prime in Python. If the number is prime return True, else return False. If the number is less than 2, return False. The function should iterate from 2 to the square root of the number to check for factors.
  def is_prime(num):
      if num < 2:
          return False
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True
  
  assert is_prime(2)==True
  assert is_prime(3)==True
  assert is_prime(4)==False
  assert is_prime(5)==True
  assert is_prime(6)==False
  assert is_prime(1)==False
  assert is_prime(-1)==False
output: def is_prime(num):
      if num < 2:
          return False
      for i in range(2, int(num ** 0.5) + 1):
          if num % i == 0:
              return False
      return True