Function Convert integer to binary string
def toBinary ( n ) : NEW_LINE INDENT r = " " NEW_LINE while ( n != 0 ) : NEW_LINE INDENT if ( n % 2 == 0 ) : NEW_LINE r = "0" + r NEW_LINE else : NEW_LINE r = "1" + r NEW_LINE n //= 2 NEW_LINE DEDENT if ( r == " " ) : NEW_LINE return "0" NEW_LINE return r NEW_LINE DEDENT