From 3fb2aa484bb9133d56afd288f252e85d2d911e07 Mon Sep 17 00:00:00 2001 From: Mauro Leonelli Date: Fri, 16 Jul 2021 17:32:09 +0200 Subject: [PATCH] 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 --- README.md | 2 +- main.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5b65312..c971746 100644 --- a/README.md +++ b/README.md @@ -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. -*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 diff --git a/main.py b/main.py index d024d88..a3eb31d 100644 --- a/main.py +++ b/main.py @@ -2,6 +2,7 @@ import prob_calculator from unittest import main +prob_calculator.random.seed(95) hat = prob_calculator.Hat(blue=4, red=2, green=6) probability = prob_calculator.experiment( hat=hat,