is this code correct for finding the sum of squares should be equal to a number given? : def sumofsquares(n):
  for i in range(1, n):
    for j in range(1, n):
      if n == ((i*i)+(j*j)):
        return (true)
        break
      else:
        return (false)