An urn contains an unknown number of ghouls. However, it is known that half of the ghouls are white, and half of the ghouls are black. Three random ghouls are drawn from the urn without replacement to make a potion so strong it will turn a person into a chicken.
Given an input which is the probability of all 3 ghouls being white, write a function to calculate the number of ghouls in the urn.
You can use this data to test your function
- A 5% probability of all 3 ghouls being white, should have 6 ghouls in the urn.