python
python copied to clipboard
[Random Concept]: Captains Log Exercise
A possibility for the random
concept? Please rate as OK/fixable/junk.
The tests are unusual, to deal with non-deterministic output. Please sanity-check them, both for accuracy and test-runner performance. I tried to pick a number of repeats that will give good coverage within a reasonable time, but this may need some fine-tuning.
Yes, I admit that's a better title.
Meanwhile, I tried estimating the chances that task 1 would randomly fail by excluding one of the possible planetary_classes from the results. I think the chance of a particular entry not being picked is 0.9 in each run (there are 10 to choose from). With 1000 runs, the chances of missing one is 0.9 ** 1000
, about 1.7e-46
. Good enough?
This has the danger of pulling me into a black hole around how to test random processes. 😉 But better we think through this now, since this won't be the only exercise with randomness in it.
chances of missing one is
0.9 ** 1000
, about1.7e-46
. Good enough?
Yes. That sounds like good enough, but I'll probably do more thinking on it as I read through. First, I want to tackle some of the concept write-ups, so we can merge them down and cross them off our list. But this is certainly near the top of the TODO. 😄
🤔 We may also want to have a hint
that explains those odds, for the (unlucky) chance that someone hits the scenario. You know me - I am paranoid. 😅