I just completed the fifth challenge in the Scientific Computing with Python Certification and I think there is an error in the test_module.py script.
Specifically, the first test in the function
test_prob_experiment checks whether the probability computed by the student is almost equal (delta=0.01) to the hard coded value
The test kept failing for me since my implemenation spits out 0.252 everytime given the seed set in the test_module. Since all other tests passed I did the math on paper for the experiment and the exact probability for the tested outcome is 0.263. I ran my code with 2 million iterations which gave me that exact value as well.
So I see two problems with the test_module. One, the expected value is off and two, a maximal deviation of 0.01 might be too low given the huge amout of possible implenations and the comparitively low number of iterations for the experiment.
Find my code here.
Please let me know if I am mistaken. Apart from that, thanks to everyone who makes this project possible! I’ve recommended it many times and still love it myself.