Help with Python Probability Calculator Project

I am having trouble completing the Python Probability Calculator challenge. I am getting failing the third test which tests to see if the probability I calculated is almost equal to the expected probability. I seem to be close but not enough to pass the test.

I have tried various random methods of of choosing balls from the hat (including choice, sample and randint) yet none of them seem to pass the test. I was wondering if I am missing something else.

Appreciate the assistance. Here is my code.

Issue is likely in different place than the ball choosing. Notice one peculiar thing about the failing result - it’s above 1.0, while probability have to be within 0.0 - 1.0. Take a closer look at the experiment function and try to find reason why that is happening.

Thank-you. I was able to find the typo causing my error.