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:
Mauro Leonelli
2021-07-16 17:32:09 +02:00
committed by GitHub
parent 5d80e84090
commit 3fb2aa484b
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -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
View File
@@ -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,