fix: improves clarity in assignment (#6)
* Adds random seed initialization in main.py * Adds a remark not to initialize random seed in draw * Update README.md
This commit is contained in:
parent
5d80e84090
commit
3fb2aa484b
@ -37,7 +37,7 @@ probability = experiment(hat=hat,
|
|||||||
|
|
||||||
Since this is based on random draws, the probability will be slightly different each time the code is run.
|
Since this is based on random draws, the probability will be slightly different each time the code is run.
|
||||||
|
|
||||||
*Hint: Consider using the modules that are already imported at the top of `prob_calculator.py`.*
|
*Hint: Consider using the modules that are already imported at the top of `prob_calculator.py`. Do not initialize random seed within `prob_calculator.py`.*
|
||||||
|
|
||||||
### Development
|
### Development
|
||||||
|
|
||||||
|
1
main.py
1
main.py
@ -2,6 +2,7 @@
|
|||||||
import prob_calculator
|
import prob_calculator
|
||||||
from unittest import main
|
from unittest import main
|
||||||
|
|
||||||
|
prob_calculator.random.seed(95)
|
||||||
hat = prob_calculator.Hat(blue=4, red=2, green=6)
|
hat = prob_calculator.Hat(blue=4, red=2, green=6)
|
||||||
probability = prob_calculator.experiment(
|
probability = prob_calculator.experiment(
|
||||||
hat=hat,
|
hat=hat,
|
||||||
|
Loading…
Reference in New Issue
Block a user