diff --git a/main.ipynb b/main.ipynb index 73f285a..51851e5 100644 --- a/main.ipynb +++ b/main.ipynb @@ -20,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ @@ -37,19 +37,36 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "def greater(a,b):\n", - " pass" + " if a > b:\n", + " return a\n", + " elif a < b:\n", + " return b\n", + " else:\n", + " return \"a = b\"" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.128s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_greater(greater)" @@ -64,19 +81,47 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "def greatest(arr):\n", - " pass" + " arr.sort()\n", + " return arr[-1]" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 35, "metadata": {}, "outputs": [], + "source": [ + "def gratest(arr): # Found it online\n", + " for i in arr:\n", + " if largest_element == None: # First loop there is no largest\n", + " largest_element = e # First loop largest will be the first \"i\"\n", + " elif e > largest:\n", + " largest = e\n", + " return e" + ] + }, + { + "cell_type": "code", + "execution_count": 34, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.135s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_greatest(greatest)" @@ -91,19 +136,34 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 31, "metadata": {}, "outputs": [], "source": [ "def sum_all(arr):\n", - " pass" + " counter = 0\n", + " for i in arr:\n", + " counter += i\n", + " return counter" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 32, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.127s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_sum(sum_all)" @@ -118,19 +178,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 47, "metadata": {}, "outputs": [], "source": [ "def mult_all(arr):\n", - " pass" + " total = 1\n", + " for i in arr:\n", + " total *= i\n", + " return total\n", + " " ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 48, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.146s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_mult(mult_all)" @@ -145,19 +221,58 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 49, "metadata": {}, "outputs": [], "source": [ "def oper_all(arr, oper):\n", - " pass" + " the_sum = 0\n", + " the_mult = 1\n", + " \n", + " if oper == \"+\":\n", + " for i in arr:\n", + " the_sum += i\n", + " return the_sum\n", + " \n", + " elif oper == \"*\":\n", + " for i in arr:\n", + " the_mult *= i\n", + " return the_mult\n", + " " ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 59, "metadata": {}, "outputs": [], + "source": [ + "def oper_all(arr, oper):\n", + " \n", + " if oper == \"+\":\n", + " return sum_all(arr)\n", + " \n", + " elif oper == \"*\":\n", + " return mult_all(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.127s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_operations(oper_all)" @@ -172,19 +287,60 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 55, "metadata": {}, "outputs": [], "source": [ "def factorial(n):\n", - " pass" + " x = 1\n", + " for i in range(1,n+1):\n", + " x = x*i\n", + " return x" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 54, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "120" + ] + }, + "execution_count": 54, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "n=5\n", + "x=1\n", + "\n", + "for i in range(1,n+1):\n", + " x = x*i\n", + " \n", + "x" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.130s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_factorial(factorial)" @@ -201,19 +357,37 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 57, "metadata": {}, "outputs": [], "source": [ "def unique(arr):\n", - " pass" + " unique = []\n", + " for i in arr:\n", + " if i not in unique:\n", + " unique.append(i)\n", + " else:\n", + " pass\n", + " return unique" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 58, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.243s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_unique(unique)" @@ -229,19 +403,113 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 83, "metadata": {}, "outputs": [], "source": [ "def mode_counter(arr):\n", - " pass" + " import operator\n", + " counter_of_i = {}\n", + " \n", + " for i in arr:\n", + " if i not in counter_of_i:\n", + " counter_of_i[i] = 1\n", + " else: # i in list\n", + " counter_of_i[i] += 1\n", + " \n", + " sorted_mydict = dict(sorted(counter_of_i.items(), key=operator.itemgetter(1), reverse = True))\n", + " \n", + " for key, value in counter_of_i.items():\n", + " if value == list(sorted_mydict.values())[0]:\n", + " return key" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 25, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{1: 2, 3: 4, 4: 1, 5: 3, 6: 3, 7: 1}\n" + ] + } + ], + "source": [ + "# test\n", + "a_list = [1,1,3,3,3,3,4,5,5,5,6,6,6,7]\n", + "\n", + "import operator\n", + "counter = {}\n", + "\n", + "for i in a_list:\n", + " if i not in counter:\n", + " counter[i] = 1\n", + " else:\n", + " counter[i] += 1\n", + "\n", + "print(counter)" + ] + }, + { + "cell_type": "code", + "execution_count": 75, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "{3: 4, 5: 3, 6: 3, 1: 2, 4: 1, 7: 1}\n" + ] + } + ], + "source": [ + "# test\n", + "sorted_mydict = dict(sorted(counter.items(), key=operator.itemgetter(1), reverse = True))\n", + "print(sorted_mydict)" + ] + }, + { + "cell_type": "code", + "execution_count": 82, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "4" + ] + }, + "execution_count": 82, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# test\n", + "list(sorted_mydict.values())[0]" + ] + }, + { + "cell_type": "code", + "execution_count": 84, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.143s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_mode(mode_counter)" @@ -257,20 +525,895 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 59, "metadata": {}, "outputs": [], "source": [ "from statistics import stdev\n", + "import math\n", + "\n", "def st_dev(arr):\n", - " pass" + " # Calculation of mean: sum/len\n", + " mean_sum = 0\n", + " for i in arr:\n", + " mean_sum += i\n", + " mean_length = 0\n", + " for i in arr:\n", + " mean_length += 1\n", + " mean = mean_sum/mean_length\n", + " \n", + " # Substract mean from each element and square it. Store in list arr_sq\n", + " arr_sq = []\n", + " for i in arr:\n", + " deviation_i = i - mean\n", + " sq_dev_i = deviation_i ** 2\n", + " arr_sq.append(sq_dev_i)\n", + " \n", + " # Sum of squared deviations\n", + " sum_sq = 0\n", + " for i in arr_sq:\n", + " sum_sq += i\n", + " \n", + " # Calculation of variance\n", + " variance = sum_sq / (mean_length-1)\n", + " \n", + " # Std is sqrt of variance\n", + " return math.sqrt(variance)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 60, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 77.39296794773377 != 541.4678877332686 within 5 delta (464.07491978553486 difference) : Should be 541.4678877332686\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 22.727567428862574 != 580.714116348875 within 5 delta (557.9865489200124 difference) : Should be 580.714116348875\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 231.6379435221891 != 659.279418591735 within 5 delta (427.6414750695459 difference) : Should be 659.279418591735\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 142.32552002642973 != 591.1149110750279 within 5 delta (448.78939104859813 difference) : Should be 591.1149110750279\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 50.41968425099444 != 591.8592582228958 within 5 delta (541.4395739719014 difference) : Should be 591.8592582228958\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 66.09946723149972 != 577.7014775186428 within 5 delta (511.6020102871431 difference) : Should be 577.7014775186428\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 156.4353037952248 != 595.1080057111805 within 5 delta (438.67270191595566 difference) : Should be 595.1080057111805\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 98.81121341394311 != 579.4194090841078 within 5 delta (480.60819567016466 difference) : Should be 579.4194090841078\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 17.983016944777578 != 605.0098878752954 within 5 delta (587.0268709305178 difference) : Should be 605.0098878752954\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 69.20495661989281 != 627.4359831418473 within 5 delta (558.2310265219544 difference) : Should be 627.4359831418473\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 57.31195317198018 != 610.8767739081532 within 5 delta (553.564820736173 difference) : Should be 610.8767739081532\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 71.71457239370527 != 583.7863856734699 within 5 delta (512.0718132797647 difference) : Should be 583.7863856734699\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 61.69418118702254 != 644.8396049344008 within 5 delta (583.1454237473782 difference) : Should be 644.8396049344008\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 10.230821166618602 != 625.3946081811299 within 5 delta (615.1637870145113 difference) : Should be 625.3946081811299\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 55.85835495006849 != 583.7656034533732 within 5 delta (527.9072485033047 difference) : Should be 583.7656034533732\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 80.68246068363685 != 565.2559654647675 within 5 delta (484.5735047811307 difference) : Should be 565.2559654647675\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 11.088163854068128 != 608.7218954209815 within 5 delta (597.6337315669133 difference) : Should be 608.7218954209815\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 124.14576703420288 != 583.8646546092345 within 5 delta (459.71888757503166 difference) : Should be 583.8646546092345\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 145.2297588552114 != 551.7633809627353 within 5 delta (406.53362210752385 difference) : Should be 551.7633809627353\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 119.62761307626317 != 550.8228253022469 within 5 delta (431.1952122259837 difference) : Should be 550.8228253022469\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 92.84539794274579 != 573.2911356287277 within 5 delta (480.44573768598195 difference) : Should be 573.2911356287277\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 102.42612908117322 != 554.3855064246152 within 5 delta (451.959377343442 difference) : Should be 554.3855064246152\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 92.04954954954954 != 601.4111583445899 within 5 delta (509.3616087950404 difference) : Should be 601.4111583445899\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 39.25309938275106 != 565.6041922112665 within 5 delta (526.3510928285154 difference) : Should be 565.6041922112665\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 48.076536397600634 != 554.4054456122046 within 5 delta (506.328909214604 difference) : Should be 554.4054456122046\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 93.19559488136022 != 600.6426636854266 within 5 delta (507.44706880406636 difference) : Should be 600.6426636854266\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 49.9674760795795 != 587.9192366892636 within 5 delta (537.9517606096841 difference) : Should be 587.9192366892636\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 64.65683412653372 != 595.0128757015594 within 5 delta (530.3560415750258 difference) : Should be 595.0128757015594\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 3.7880209126315227 != 589.1552944176879 within 5 delta (585.3672735050563 difference) : Should be 589.1552944176879\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 21.079322512035887 != 572.6371516559054 within 5 delta (551.5578291438695 difference) : Should be 572.6371516559054\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 93.16572952483514 != 551.686018635505 within 5 delta (458.52028911066986 difference) : Should be 551.686018635505\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 1.4248484960566796 != 575.0649616738334 within 5 delta (573.6401131777767 difference) : Should be 575.0649616738334\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 153.47714285714284 != 560.7719391652029 within 5 delta (407.29479630806003 difference) : Should be 560.7719391652029\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 5.725225225225226 != 624.431617829643 within 5 delta (618.7063926044177 difference) : Should be 624.431617829643\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 71.857911008204 != 569.9646303428812 within 5 delta (498.10671933467717 difference) : Should be 569.9646303428812\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 0.5659164584181126 != 555.256803332529 within 5 delta (554.6908868741109 difference) : Should be 555.256803332529\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 110.20071874855631 != 541.2974712493606 within 5 delta (431.09675250080426 difference) : Should be 541.2974712493606\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 38.65384615384615 != 581.1641116030692 within 5 delta (542.510265449223 difference) : Should be 581.1641116030692\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 7.035522707342518 != 567.0233677380663 within 5 delta (559.9878450307239 difference) : Should be 567.0233677380663\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 111.05819191908883 != 603.2214057606179 within 5 delta (492.1632138415291 difference) : Should be 603.2214057606179\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 80.2560975609756 != 567.1302828748335 within 5 delta (486.8741853138579 difference) : Should be 567.1302828748335\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 29.35255157604883 != 541.7944107485886 within 5 delta (512.4418591725397 difference) : Should be 541.7944107485886\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 40.45471699300499 != 550.542381915974 within 5 delta (510.08766492296905 difference) : Should be 550.542381915974\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 69.89334478657139 != 582.0025730617564 within 5 delta (512.1092282751849 difference) : Should be 582.0025730617564\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 118.10785130030884 != 585.6371909342173 within 5 delta (467.5293396339085 difference) : Should be 585.6371909342173\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 150.58160317540796 != 643.4568485213993 within 5 delta (492.8752453459913 difference) : Should be 643.4568485213993\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 178.39264803044603 != 573.2006835794197 within 5 delta (394.80803554897363 difference) : Should be 573.2006835794197\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 122.33568272040118 != 483.94986999343917 within 5 delta (361.614187273038 difference) : Should be 483.94986999343917\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 121.4781882318403 != 578.1339628402415 within 5 delta (456.65577460840115 difference) : Should be 578.1339628402415\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 87.92284101093739 != 615.5571142222021 within 5 delta (527.6342732112647 difference) : Should be 615.5571142222021\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 139.49852200776715 != 591.8125888749556 within 5 delta (452.31406686718844 difference) : Should be 591.8125888749556\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 64.19313113893828 != 544.3408405595159 within 5 delta (480.1477094205776 difference) : Should be 544.3408405595159\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 52.847238991113336 != 594.0138716514779 within 5 delta (541.1666326603645 difference) : Should be 594.0138716514779\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 86.99138363335925 != 610.3670132871623 within 5 delta (523.3756296538031 difference) : Should be 610.3670132871623\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 75.00382708855464 != 609.3498484490482 within 5 delta (534.3460213604935 difference) : Should be 609.3498484490482\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 95.82893097451306 != 564.9846319332372 within 5 delta (469.15570095872414 difference) : Should be 564.9846319332372\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 2.9343484184782223 != 541.8676812417945 within 5 delta (538.9333328233163 difference) : Should be 541.8676812417945\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 80.2867375125595 != 506.1732371574901 within 5 delta (425.8864996449306 difference) : Should be 506.1732371574901\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 307.7001231346521 != 452.71704769615786 within 5 delta (145.0169245615058 difference) : Should be 452.71704769615786\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 230.8750171710205 != 651.3382308056936 within 5 delta (420.4632136346731 difference) : Should be 651.3382308056936\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 49.45036294437516 != 653.6151505569574 within 5 delta (604.1647876125822 difference) : Should be 653.6151505569574\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 75.81302819401849 != 617.1698262796441 within 5 delta (541.3567980856257 difference) : Should be 617.1698262796441\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 20.157514404087426 != 545.9732334302236 within 5 delta (525.8157190261361 difference) : Should be 545.9732334302236\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 32.28229190913954 != 570.1155931228759 within 5 delta (537.8333012137364 difference) : Should be 570.1155931228759\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 66.25411027515153 != 499.0096469038425 within 5 delta (432.75553662869095 difference) : Should be 499.0096469038425\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 26.603161774876643 != 564.4801561634539 within 5 delta (537.8769943885773 difference) : Should be 564.4801561634539\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 56.39995372353108 != 527.8328224796579 within 5 delta (471.4328687561268 difference) : Should be 527.8328224796579\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 41.88225859887726 != 532.3614861614727 within 5 delta (490.4792275625955 difference) : Should be 532.3614861614727\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 90.1280864106741 != 537.6599276055534 within 5 delta (447.53184119487935 difference) : Should be 537.6599276055534\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 13.61654975187372 != 569.7867521285789 within 5 delta (556.1702023767052 difference) : Should be 569.7867521285789\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 11.457431093955018 != 612.0133688379394 within 5 delta (600.5559377439844 difference) : Should be 612.0133688379394\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 152.91471487165734 != 622.6563438853291 within 5 delta (469.74162901367174 difference) : Should be 622.6563438853291\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 84.8428563169832 != 585.2242989532718 within 5 delta (500.3814426362886 difference) : Should be 585.2242989532718\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 17.173719578780222 != 550.2344554695893 within 5 delta (533.060735890809 difference) : Should be 550.2344554695893\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 180.5387301710839 != 560.9590907091847 within 5 delta (380.4203605381008 difference) : Should be 560.9590907091847\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 72.67249230192478 != 516.0264093067726 within 5 delta (443.35391700484786 difference) : Should be 516.0264093067726\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 15.695067613498525 != 598.2846829936079 within 5 delta (582.5896153801094 difference) : Should be 598.2846829936079\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 167.03728489608105 != 609.8692855477684 within 5 delta (442.8320006516874 difference) : Should be 609.8692855477684\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 23.39917571945392 != 585.7626719085285 within 5 delta (562.3634961890747 difference) : Should be 585.7626719085285\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 17.09331843557216 != 582.4586250621205 within 5 delta (565.3653066265483 difference) : Should be 582.4586250621205\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 31.744808979632428 != 537.894972921238 within 5 delta (506.1501639416056 difference) : Should be 537.894972921238\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 50.50598416285559 != 571.501148378535 within 5 delta (520.9951642156794 difference) : Should be 571.501148378535\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 91.0057882194306 != 513.1516724397758 within 5 delta (422.1458842203452 difference) : Should be 513.1516724397758\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 55.15701728266861 != 604.8709921233614 within 5 delta (549.7139748406928 difference) : Should be 604.8709921233614\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 81.91792582949829 != 577.6511539577815 within 5 delta (495.7332281282832 difference) : Should be 577.6511539577815\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 12.90351841748611 != 528.78504135393 within 5 delta (515.8815229364438 difference) : Should be 528.78504135393\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 180.55546618026224 != 583.202052636249 within 5 delta (402.64658645598684 difference) : Should be 583.202052636249\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 21.695337961451273 != 587.5608171385137 within 5 delta (565.8654791770624 difference) : Should be 587.5608171385137\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 52.140585516780526 != 542.4019191071384 within 5 delta (490.2613335903579 difference) : Should be 542.4019191071384\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 90.8447899214413 != 608.0412569480686 within 5 delta (517.1964670266273 difference) : Should be 608.0412569480686\n", + "\n" + ] + }, + { + "name": "stderr", + "output_type": "stream", + "text": [ + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 115.17812954473487 != 568.8232962642101 within 5 delta (453.6451667194752 difference) : Should be 568.8232962642101\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 156.87431599980974 != 656.8287286926318 within 5 delta (499.9544126928221 difference) : Should be 656.8287286926318\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 92.34136027476194 != 613.31195730691 within 5 delta (520.9705970321481 difference) : Should be 613.31195730691\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 24.16260162601626 != 581.2834924931091 within 5 delta (557.1208908670928 difference) : Should be 581.2834924931091\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 18.382919766196956 != 515.1652148104768 within 5 delta (496.7822950442798 difference) : Should be 515.1652148104768\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 76.77166722749278 != 586.7781735886228 within 5 delta (510.00650636113005 difference) : Should be 586.7781735886228\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 112.89426058960692 != 556.3418413569524 within 5 delta (443.44758076734547 difference) : Should be 556.3418413569524\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 139.83477949192596 != 586.6989172823058 within 5 delta (446.8641377903799 difference) : Should be 586.6989172823058\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 30.53387533875339 != 580.9056666586733 within 5 delta (550.3717913199199 difference) : Should be 580.9056666586733\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"C:\\Users\\mplan\\Ironhack\\Bootcamp\\week-1\\day4-lab\\lab-functions\\mod\\testing.py\", line 142, in runTest\n", + " self.assertAlmostEqual(fn(self.input), self.output, delta=5, msg=f\"Should be {self.output}\")\n", + "AssertionError: 18.00271002710027 != 611.7486770253093 within 5 delta (593.745966998209 difference) : Should be 611.7486770253093\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.103s\n", + "\n", + "FAILED (failures=100)\n" + ] + } + ], "source": [ "# This will test your function \n", "test_stdev(st_dev)" @@ -285,19 +1428,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 104, "metadata": {}, "outputs": [], "source": [ "def pangram(string):\n", - " pass" + " letters = \"abcdefghijklmnopqrstuvwxyz\" \n", + " for i in letters:\n", + " if i not in string.lower():\n", + " return False\n", + " return True" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 105, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "..............................\n", + "----------------------------------------------------------------------\n", + "Ran 30 tests in 0.035s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_pangram(pangram)" @@ -314,12 +1473,57 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 30, "metadata": {}, "outputs": [], "source": [ "def sort_alpha(string):\n", - " pass" + " \n", + " string_char = \"\"\n", + " store_words = []\n", + " \n", + " for i in string:\n", + " if i.isalpha()\n", + " string_char += i\n", + " \n", + " else:\n", + " store_words.append(string_char)\n", + " \n", + " #TA help -> here I would like to jump to the next position of the string (jumping the comma)\n", + " # The idea is to keep store the words as elements in a list (see below)\n", + " \n", + " " + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Heyitsme\n", + "['Hey', 'Heyits']\n" + ] + } + ], + "source": [ + "a_string = \"Hey,its,me\"\n", + "string_char = \"\"\n", + "\n", + "store_words = []\n", + "\n", + "for i in a_string:\n", + " if i.isalpha():\n", + " string_char += i\n", + " \n", + " else:\n", + " store_words.append(string_char)\n", + "\n", + "print(string_char)\n", + "print(store_words) #TA - why does it reset on the second element ('Heyits')" ] }, { @@ -342,19 +1546,69 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 21, "metadata": {}, "outputs": [], "source": [ "def check_pass(string):\n", - " pass" + " \n", + " points_length = 0\n", + " points_lower = 0\n", + " points_upper = 0\n", + " points_digit = 0\n", + " points_special = 0\n", + " \n", + " counter_length = 0\n", + " for i in string: # at least 8 charac\n", + " if i in string:\n", + " counter_length += 1 \n", + " if counter_length >= 8:\n", + " points_length = 1\n", + " \n", + " for i in string: # at least one lower case\n", + " if i.islower():\n", + " points_lower = 1\n", + " \n", + " for i in string: # at least one upper\n", + " if i.isupper():\n", + " points_upper = 1\n", + " \n", + " for i in string: # at least one number\n", + " if i.isdigit():\n", + " points_digit = 1\n", + " \n", + " points_special = 0\n", + " special = [\"#\", \"@\", \"!\", \"$\", \"%\", \"&\", \"(\", \")\", \"^\", \"*\", \"[\", \"]\", \"{\", \"}\"] # at least one special char\n", + " for i in string:\n", + " if i in special:\n", + " points_special = 1\n", + " \n", + " total_points = points_length + points_lower + points_upper + points_digit + points_special\n", + " \n", + " if total_points < 5:\n", + " return False\n", + " \n", + " else:\n", + " return True\n" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 23, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.160s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_pass(check_pass)" @@ -363,7 +1617,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -377,7 +1631,20 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.6" + "version": "3.9.12" + }, + "toc": { + "base_numbering": 1, + "nav_menu": {}, + "number_sections": true, + "sideBar": true, + "skip_h1_title": false, + "title_cell": "Table of Contents", + "title_sidebar": "Contents", + "toc_cell": false, + "toc_position": {}, + "toc_section_display": true, + "toc_window_display": false } }, "nbformat": 4,