sum(random.uniform(1, 5)**3 for i in range(10000)) / 10000
Many people don't know that the random module allows to sample from many distributions directly without having to construct your own. sum(random.uniform(1, 5)**3 for i in range(10000)) / 10000
Many people don't know that the random module allows to sample from many distributions directly without having to construct your own.