double moon classification written in Python