Answers for "python program to get equally distributed number from given range"

0

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)]
Posted by: Guest on July-27-2020

Code answers related to "python program to get equally distributed number from given range"

Python Answers by Framework

Browse Popular Code Answers by Language