I have integers in the range of 1..10. I want to choose one based on a distribution of x^2.
What I want is something like:
def random_from_exp(min, max, exponent):
...
I'm not familiar with maths or stats and I don't know how to interpret previous answers to this question (lambdas, inversions and whatnot) in the context of my problem above. Please provide a simple explanation with an example.