Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python program to get equally distributed number from given range

def steps(start,end,n):
    if n<2:
        raise Exception("behaviour not defined for n<2")
    step = (end-start)/float(n-1)
    return [int(round(start+x*step)) for x in range(n)]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #program #equally #distributed #number #range
ADD COMMENT
Topic
Name
8+9 =