Function to split the fraction into the N parts
def splitFraction ( n , d ) : NEW_LINE INDENT ar = [ ] NEW_LINE for i in range ( 0 , n ) : NEW_LINE INDENT ar . append ( 0 ) NEW_LINE DEDENT first = d + n - 1 NEW_LINE ar [ 0 ] = first NEW_LINE DEDENT