Choose which k of the n positions are heads, over all 2n2^n2n equally likely sequences:
k
n
Return the probability as a float.
solve(3, 2) -> 0.375 # HHT, HTH, THH out of 8 solve(5, 2) -> 0.3125
Sign in to write and run your own code.
solve(...)