This is more of an "anit-hint": ignore the author's hint for using the built-in imag and other functions. Instead, compute the discriminant and check whether it's positive, negative, or zero.