Error on Prob_Calc project

I get an error saying my probability is wrong, but I don’t get why.
This is my replit

Your code checks if it has to increase “success” for EVERY COLOR of balls.
Because the test-case has two colors, you end up with double the actual propability.

Maybe utilizing the continue keyword could help. Maybe you can do it with break if you modify the loops. Either way, you need to rethink the loops ^^

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.