The probabilities assigned to all outcomes of a sample space must each lie in and together sum to one:
Return True if the list is a valid distribution, else False. Allow a tiny
floating-point tolerance on the sum.
solve([0.5, 0.25, 0.25]) -> True
solve([0.5, 0.6]) -> False
Sign in to write and run your own code.
solve(...)