Check if x is a single digit integer
if len ( str ( x ) ) == 1 : NEW_LINE INDENT break NEW_LINE DEDENT x = sum ( list ( map ( int , str ( x ) ) ) ) NEW_LINE if len ( str ( x ) ) == 1 and N == 0 : NEW_LINE return 1 NEW_LINE return 0 NEW_LINE