python program to get equally distributed number from given range

Solutions on MaxInterview for python program to get equally distributed number from given range by the best coders in the world

showing results for - "python program to get equally distributed number from given range"
Renata
27 Jan 2017
1def steps(start,end,n):
2    if n<2:
3        raise Exception("behaviour not defined for n<2")
4    step = (end-start)/float(n-1)
5    return [int(round(start+x*step)) for x in range(n)]