diff --git a/.ipynb_checkpoints/main-checkpoint.ipynb b/.ipynb_checkpoints/main-checkpoint.ipynb new file mode 100644 index 0000000..5e06275 --- /dev/null +++ b/.ipynb_checkpoints/main-checkpoint.ipynb @@ -0,0 +1,2108 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Functions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "On this lab we will put to practice some of the concepts we have learned on this past few days.\n", + "\n", + "`NOTE: On this lab you should try to write all the functions yourself using only the most basic of python syntax and without functions such as len, count, sum, max, min, in, etc. Give it a try. πŸ§‘πŸ»β€πŸ’»πŸ‘©πŸ»β€πŸ’»`\n", + "\n", + "The cell after each exercise contains a few tests to check if your function works as expected." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from mod.testing import *\n", + "import unittest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Write a function that returns the greater of two numbers" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "def greater(a,b):\n", + " if a > b:\n", + " return a\n", + " else:\n", + " return b" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.199s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greater(greater)" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "6" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "greater(4,6)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Now write a function that returns the largest element on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 59, + "metadata": {}, + "outputs": [], + "source": [ + "def greatest(lst):\n", + " lst.sort()\n", + " return lst[-1]" + ] + }, + { + "cell_type": "code", + "execution_count": 60, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.290s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greatest(greatest)" + ] + }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "None\n" + ] + } + ], + "source": [ + "lst = [2,6,7,8,67,89,43,67]\n", + "print(lst.sort())" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "89" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "greatest(lst)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3. Write a function that sums all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 19, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_all(lst):\n", + " counter = 0\n", + " for num in lst: \n", + " counter += num\n", + " return counter" + ] + }, + { + "cell_type": "code", + "execution_count": 20, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.303s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_sum(sum_all)" + ] + }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "289" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sum_all(lst)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 4. Write another function that multiplies all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "metadata": {}, + "outputs": [], + "source": [ + "def mult_all(lst):\n", + " product = 1\n", + " for num in lst: \n", + " product *= num\n", + " return product" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.229s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_mult(mult_all)" + ] + }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "11544558816" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mult_all(lst)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 5. Now combine those two ideas and write a function that receives a list and either \"+\" or \"*\" and outputs acordingly" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [], + "source": [ + "def oper_all(arr, oper = \"*\"):\n", + " if oper == \"+\":\n", + " return sum_all(arr)\n", + " else:\n", + " return mult_all(arr)" + ] + }, + { + "cell_type": "code", + "execution_count": 66, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "11544558816" + ] + }, + "execution_count": 66, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "oper_all(lst,\"*\")" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.326s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_operations(oper_all)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 6. Write a function that returns the factorial of a number." + ] + }, + { + "cell_type": "code", + "execution_count": 22, + "metadata": {}, + "outputs": [], + "source": [ + "def factorial(n):\n", + " return 1 if (n==1 or n==0) else n * factorial(n - 1)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.252s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_factorial(factorial)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 7. Write a function that takes a list and returns a list of the unique values.\n", + "\n", + "`NOTE: You cannot use set. πŸ€”`" + ] + }, + { + "cell_type": "code", + "execution_count": 55, + "metadata": {}, + "outputs": [], + "source": [ + "def unique(lst_un):\n", + " unique_list = []\n", + " for i in lst_un:\n", + " if i not in unique_list:\n", + " unique_list.append(i)\n", + " for i in unique_list:\n", + " return unique_list" + ] + }, + { + "cell_type": "code", + "execution_count": 56, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[2, 6, 7, 8, 43, 67, 67, 89]" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lst" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[2, 6, 7, 8, 43, 67, 89]" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "unique(lst)" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.464s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_unique(unique)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 8. Write a function that returns the mode of a list, i.e.: the element that appears the most times.\n", + "`NOTE: You should not use count... 🧐`" + ] + }, + { + "cell_type": "code", + "execution_count": 86, + "metadata": {}, + "outputs": [], + "source": [ + "def mode_counter(arr):\n", + " 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": 53, + "metadata": {}, + "outputs": [], + "source": [ + "## manera de hacerlo con librerΓ­as\n", + "def mode_counter(arr) :\n", + " m = max([arr.count(a) for a in arr])\n", + " return [x for x in arr if arr.count(x) == m][0] if m>1 else None" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.320s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_mode(mode_counter)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 9. Write a function that calculates the standard deviation of a list.\n", + "`NOTE: Do not use any libraries or already built functions. πŸ˜‰`" + ] + }, + { + "cell_type": "code", + "execution_count": 43, + "metadata": {}, + "outputs": [], + "source": [ + "from statistics import stdev\n", + "def st_dev(list_sd):\n", + " mean = sum(list_sd) / len(list_sd)\n", + " variance = sum([((i - mean) ** 2) for i in list_sd]) / len(list_sd)\n", + " res = variance ** 0.5\n", + " return res" + ] + }, + { + "cell_type": "code", + "execution_count": 68, + "metadata": {}, + "outputs": [], + "source": [ + "def st_dev(list_sd):\n", + " return statistics.stdev(list_sd)" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.442s\n", + "\n", + "FAILED (errors=100)\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_stdev(st_dev)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 10. Write a function to check if a string is a pangram, i.e.: if it contains all the letters of the alphabet at least once. Mind that the strings may contain characters that are not letters." + ] + }, + { + "cell_type": "code", + "execution_count": 94, + "metadata": {}, + "outputs": [], + "source": [ + "def pangram(string):\n", + " alphabet = \"abcdefghijklmnopqrstuvwxyz\"\n", + " for char in alphabet:\n", + " if char not in string.lower():\n", + " return False\n", + " return True " + ] + }, + { + "cell_type": "code", + "execution_count": 91, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "..............................\n", + "----------------------------------------------------------------------\n", + "Ran 30 tests in 0.116s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_pangram(pangram)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 11. Write a function that receives a string of comma separated words and returns a string of comma separated words sorted alphabetically.\n", + "\n", + "`NOTE: You may use sorted but not split and definitely no join! πŸ€ͺ`" + ] + }, + { + "cell_type": "code", + "execution_count": 149, + "metadata": {}, + "outputs": [], + "source": [ + "def sort_alpha(string):\n", + " string+=\",\"\n", + " newlist=[]\n", + " word=\"\"\n", + " newword=\"\"\n", + " for letter in string.lower():\n", + " if letter ==\",\":\n", + " \n", + " newlist.append(word)\n", + " word=\"\"\n", + " else:\n", + " word+=letter\n", + " \n", + " newlist.sort()\n", + " \n", + " for elem in newlist:\n", + " newword+=\",\"+elem\n", + " \n", + " newword2=newword[1:]\n", + " return newword2" + ] + }, + { + "cell_type": "code", + "execution_count": 92, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[' ',\n", + " ' ',\n", + " ',',\n", + " ',',\n", + " 'a',\n", + " 'a',\n", + " 'c',\n", + " 'e',\n", + " 'l',\n", + " 'l',\n", + " 'l',\n", + " 'o',\n", + " 'r',\n", + " 't',\n", + " 'u',\n", + " 'y']" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a_string = \"call, you, later\"\n", + "sorted_characters = sorted(a_string)\n", + "sorted_characters" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[' ',\n", + " ' ',\n", + " ',',\n", + " ',',\n", + " 'a',\n", + " 'a',\n", + " 'c',\n", + " 'e',\n", + " 'l',\n", + " 'l',\n", + " 'l',\n", + " 'o',\n", + " 'r',\n", + " 't',\n", + " 'u',\n", + " 'y']" + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sort_alpha(a_string)" + ] + }, + { + "cell_type": "code", + "execution_count": 150, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.366s\n", + "\n", + "OK\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_alpha(sort_alpha)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 12. Write a function to check if a given password is strong (at least 8 characters, at least one lower case, at least one upper case, at least one number and at least one special character). It should output True if strong and False if not." + ] + }, + { + "cell_type": "code", + "execution_count": 151, + "metadata": {}, + "outputs": [], + "source": [ + "def check_pass(password):\n", + " # at least 8 characters\n", + " if len(password) <= 8:\n", + " return False\n", + " # at least one lower case\n", + " if password.isupper() == True:\n", + " return False \n", + " # at least one upper case\n", + " if password.islower() == True:\n", + " return False \n", + " # at least one number\n", + " if password.isalpha() == True:\n", + " return False \n", + " # at least one special character\n", + " if password.isalnum() == True:\n", + " return False\n", + " return True" + ] + }, + { + "cell_type": "code", + "execution_count": 152, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 152, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "password = \"jolHgyf6587_kjndfgewgwefy\"\n", + "password.isalpha()" + ] + }, + { + "cell_type": "code", + "execution_count": 153, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 153, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "password.isalnum()" + ] + }, + { + "cell_type": "code", + "execution_count": 154, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 154, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "password.isupper()" + ] + }, + { + "cell_type": "code", + "execution_count": 155, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 155, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "check_pass(password)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + " " + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + ".................FF....F.F....FF...FF....F..F..........F............F....F...F.......FF..FF....F....\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: False != True : Should be True\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: False != True : Should be True\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.323s\n", + "\n", + "FAILED (failures=19)\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_pass(check_pass)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.8.13" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/main.ipynb b/main.ipynb index 73f285a..5e06275 100644 --- a/main.ipynb +++ b/main.ipynb @@ -20,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 1, "metadata": {}, "outputs": [], "source": [ @@ -37,24 +37,59 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "def greater(a,b):\n", - " pass" + " if a > b:\n", + " return a\n", + " else:\n", + " return b" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 3, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.199s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_greater(greater)" ] }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "6" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "greater(4,6)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -64,24 +99,79 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 59, "metadata": {}, "outputs": [], "source": [ - "def greatest(arr):\n", - " pass" + "def greatest(lst):\n", + " lst.sort()\n", + " return lst[-1]" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 60, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.290s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_greatest(greatest)" ] }, + { + "cell_type": "code", + "execution_count": 61, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "None\n" + ] + } + ], + "source": [ + "lst = [2,6,7,8,67,89,43,67]\n", + "print(lst.sort())" + ] + }, + { + "cell_type": "code", + "execution_count": 62, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "89" + ] + }, + "execution_count": 62, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "greatest(lst)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -91,24 +181,61 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 19, "metadata": {}, "outputs": [], "source": [ - "def sum_all(arr):\n", - " pass" + "def sum_all(lst):\n", + " counter = 0\n", + " for num in lst: \n", + " counter += num\n", + " return counter" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 20, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.303s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_sum(sum_all)" ] }, + { + "cell_type": "code", + "execution_count": 21, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "289" + ] + }, + "execution_count": 21, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sum_all(lst)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -118,24 +245,61 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 14, "metadata": {}, "outputs": [], "source": [ - "def mult_all(arr):\n", - " pass" + "def mult_all(lst):\n", + " product = 1\n", + " for num in lst: \n", + " product *= num\n", + " return product" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 15, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.229s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_mult(mult_all)" ] }, + { + "cell_type": "code", + "execution_count": 16, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "11544558816" + ] + }, + "execution_count": 16, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "mult_all(lst)" + ] + }, { "cell_type": "markdown", "metadata": {}, @@ -145,19 +309,54 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 65, "metadata": {}, "outputs": [], "source": [ - "def oper_all(arr, oper):\n", - " pass" + "def oper_all(arr, oper = \"*\"):\n", + " if oper == \"+\":\n", + " return sum_all(arr)\n", + " else:\n", + " return mult_all(arr)" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 66, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "11544558816" + ] + }, + "execution_count": 66, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "oper_all(lst,\"*\")" + ] + }, + { + "cell_type": "code", + "execution_count": 67, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.326s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_operations(oper_all)" @@ -172,19 +371,31 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 22, "metadata": {}, "outputs": [], "source": [ "def factorial(n):\n", - " pass" + " return 1 if (n==1 or n==0) else n * factorial(n - 1)" ] }, { "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.252s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_factorial(factorial)" @@ -201,19 +412,76 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 55, "metadata": {}, "outputs": [], "source": [ - "def unique(arr):\n", - " pass" + "def unique(lst_un):\n", + " unique_list = []\n", + " for i in lst_un:\n", + " if i not in unique_list:\n", + " unique_list.append(i)\n", + " for i in unique_list:\n", + " return unique_list" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 56, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "[2, 6, 7, 8, 43, 67, 67, 89]" + ] + }, + "execution_count": 56, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "lst" + ] + }, + { + "cell_type": "code", + "execution_count": 57, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[2, 6, 7, 8, 43, 67, 89]" + ] + }, + "execution_count": 57, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "unique(lst)" + ] + }, + { + "cell_type": "code", + "execution_count": 58, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.464s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_unique(unique)" @@ -229,19 +497,56 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 86, "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": 53, "metadata": {}, "outputs": [], + "source": [ + "## manera de hacerlo con librerΓ­as\n", + "def mode_counter(arr) :\n", + " m = max([arr.count(a) for a in arr])\n", + " return [x for x in arr if arr.count(x) == m][0] if m>1 else None" + ] + }, + { + "cell_type": "code", + "execution_count": 87, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.320s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_mode(mode_counter)" @@ -257,20 +562,1045 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 43, "metadata": {}, "outputs": [], "source": [ "from statistics import stdev\n", - "def st_dev(arr):\n", - " pass" + "def st_dev(list_sd):\n", + " mean = sum(list_sd) / len(list_sd)\n", + " variance = sum([((i - mean) ** 2) for i in list_sd]) / len(list_sd)\n", + " res = variance ** 0.5\n", + " return res" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 68, "metadata": {}, "outputs": [], + "source": [ + "def st_dev(list_sd):\n", + " return statistics.stdev(list_sd)" + ] + }, + { + "cell_type": "code", + "execution_count": 69, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_stdev..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/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", + " File \"/var/folders/dj/6p4w_3415gd7vr_k5c0wjgjc0000gn/T/ipykernel_42460/1490405141.py\", line 2, in st_dev\n", + " return statistics.stdev(list_sd)\n", + "NameError: name 'statistics' is not defined\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.442s\n", + "\n", + "FAILED (errors=100)\n" + ] + } + ], "source": [ "# This will test your function \n", "test_stdev(st_dev)" @@ -285,19 +1615,35 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 94, "metadata": {}, "outputs": [], "source": [ "def pangram(string):\n", - " pass" + " alphabet = \"abcdefghijklmnopqrstuvwxyz\"\n", + " for char in alphabet:\n", + " if char not in string.lower():\n", + " return False\n", + " return True " ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 91, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "..............................\n", + "----------------------------------------------------------------------\n", + "Ran 30 tests in 0.116s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_pangram(pangram)" @@ -314,19 +1660,121 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 149, "metadata": {}, "outputs": [], "source": [ "def sort_alpha(string):\n", - " pass" + " string+=\",\"\n", + " newlist=[]\n", + " word=\"\"\n", + " newword=\"\"\n", + " for letter in string.lower():\n", + " if letter ==\",\":\n", + " \n", + " newlist.append(word)\n", + " word=\"\"\n", + " else:\n", + " word+=letter\n", + " \n", + " newlist.sort()\n", + " \n", + " for elem in newlist:\n", + " newword+=\",\"+elem\n", + " \n", + " newword2=newword[1:]\n", + " return newword2" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 92, "metadata": {}, - "outputs": [], + "outputs": [ + { + "data": { + "text/plain": [ + "[' ',\n", + " ' ',\n", + " ',',\n", + " ',',\n", + " 'a',\n", + " 'a',\n", + " 'c',\n", + " 'e',\n", + " 'l',\n", + " 'l',\n", + " 'l',\n", + " 'o',\n", + " 'r',\n", + " 't',\n", + " 'u',\n", + " 'y']" + ] + }, + "execution_count": 92, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "a_string = \"call, you, later\"\n", + "sorted_characters = sorted(a_string)\n", + "sorted_characters" + ] + }, + { + "cell_type": "code", + "execution_count": 93, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "[' ',\n", + " ' ',\n", + " ',',\n", + " ',',\n", + " 'a',\n", + " 'a',\n", + " 'c',\n", + " 'e',\n", + " 'l',\n", + " 'l',\n", + " 'l',\n", + " 'o',\n", + " 'r',\n", + " 't',\n", + " 'u',\n", + " 'y']" + ] + }, + "execution_count": 93, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "sort_alpha(a_string)" + ] + }, + { + "cell_type": "code", + "execution_count": 150, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.366s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_alpha(sort_alpha)" @@ -336,18 +1784,113 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## 12. Write a function to check if a given password is strong (at least 8 characters, at least one lower case, at least one upper case, at least one number and at least one special character). It should output True if strong and False if not.\n", - "`Valid special characters: # @ ! $ % & ( ) ^ * [ ] { }`" + "## 12. Write a function to check if a given password is strong (at least 8 characters, at least one lower case, at least one upper case, at least one number and at least one special character). It should output True if strong and False if not." ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 151, "metadata": {}, "outputs": [], "source": [ - "def check_pass(string):\n", - " pass" + "def check_pass(password):\n", + " # at least 8 characters\n", + " if len(password) <= 8:\n", + " return False\n", + " # at least one lower case\n", + " if password.isupper() == True:\n", + " return False \n", + " # at least one upper case\n", + " if password.islower() == True:\n", + " return False \n", + " # at least one number\n", + " if password.isalpha() == True:\n", + " return False \n", + " # at least one special character\n", + " if password.isalnum() == True:\n", + " return False\n", + " return True" + ] + }, + { + "cell_type": "code", + "execution_count": 152, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 152, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "password = \"jolHgyf6587_kjndfgewgwefy\"\n", + "password.isalpha()" + ] + }, + { + "cell_type": "code", + "execution_count": 153, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 153, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "password.isalnum()" + ] + }, + { + "cell_type": "code", + "execution_count": 154, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "False" + ] + }, + "execution_count": 154, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "password.isupper()" + ] + }, + { + "cell_type": "code", + "execution_count": 155, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "True" + ] + }, + "execution_count": 155, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "check_pass(password)" ] }, { @@ -355,15 +1898,195 @@ "execution_count": null, "metadata": {}, "outputs": [], + "source": [ + " " + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + ".................FF....F.F....FF...FF....F..F..........F............F....F...F.......FF..FF....F....\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: False != True : Should be True\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: False != True : Should be True\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_pass..TestKnown)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/narea/Desktop/ironhack/labs/lab-functions/mod/testing.py\", line 202, in runTest\n", + " self.assertEqual(fn(self.input), self.output, f\"Should be {self.output}\")\n", + "AssertionError: True != False : Should be False\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.323s\n", + "\n", + "FAILED (failures=19)\n" + ] + } + ], "source": [ "# This will test your function \n", "test_pass(check_pass)" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -377,7 +2100,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.6" + "version": "3.8.13" } }, "nbformat": 4, diff --git a/mod/__pycache__/testing.cpython-38.pyc b/mod/__pycache__/testing.cpython-38.pyc new file mode 100644 index 0000000..62c9cf0 Binary files /dev/null and b/mod/__pycache__/testing.cpython-38.pyc differ