function to convert num to base 6
def baseconversion ( arr , num , base ) : NEW_LINE INDENT i = 0 ; NEW_LINE if ( num == 0 ) : NEW_LINE INDENT return 0 ; NEW_LINE DEDENT while ( num > 0 ) : NEW_LINE INDENT rem = num % base ; NEW_LINE i = i + 1 ; NEW_LINE arr [ i ] = rem ; NEW_LINE num = num // base ; NEW_LINE DEDENT return i ; NEW_LINE DEDENT