Bernoulli Trial Success Probability - Coding problem | OneNoughtOne