<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def iscomet(self):
 """`True` if `targetname` appears to be a comet. """


        # treat this object as comet if there is a prefix/number
        if self.comet is not None:
            return self.comet
        elif self.asteroid is not None:
            return not self.asteroid
        else:
            return (self.parse_comet()[0] is not None or
                    self.parse_comet()[1] is not None)