algorithm to slice a number into parts
VarunGupta: There can be many ways to do so, one of them is already described by cperciva.Another can be,a) All Integers
n1 = n2 = n3 =.....= n[m-1] = int(n / m) and 
nm = n - (n1 + n2 + n3 +.....+ n[m-1])b) Floats
n1 = n2 = n3 =.....= n[m] = n / mI feel the problem can be more serious if you want the parts to be in certain fashion or distribution.