I used this method
for n in range(10,99):
  def firstDigit(n) :
 
     while n >= 10:
         n = n / 10;
     
     return int(n)
 
  def lastDigit(n) :
 
    
     return (n % 10)
     
 z = firstDigit(n)**2 + lastDigit(n)**2 + firstDigit(n) + lastDigit(n);
 if z == n:
  print(z)
But gave this error why?
IndentationError: unindent does not match any outer indentation level
 
     
     
    