I think you could write your own function like this [code=python] from random import random from math import sqrt def triangular(a, c, b): c = float(c) t = (c-a)/(b-a) y = sqrt(random()) d = a if random() < t else b return d + (c-d) * y if __name__ == … Read More
By the way, I ran your function 1000 times with a lower bound of 1, an upper bound of 4 and a most likely number of 3. I then plotted the number in Excel and have attached the graph. It is quite triangular. Read More