From 6e911d0df506cd2b7465f7d2a3a6bf534d4d88eb Mon Sep 17 00:00:00 2001 From: rafaeldr5150 Date: Wed, 8 Oct 2025 16:51:05 +0200 Subject: [PATCH 1/2] First Try --- .DS_Store | Bin 0 -> 6148 bytes main.ipynb | 505 ++++++-- main1.ipynb | 1443 +++++++++++++++++++++++ mod/__pycache__/testing.cpython-313.pyc | Bin 0 -> 20211 bytes 4 files changed, 1875 insertions(+), 73 deletions(-) create mode 100644 .DS_Store create mode 100644 main1.ipynb create mode 100644 mod/__pycache__/testing.cpython-313.pyc diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..749cca34e4d307d1ce6e02791c7d88b16f07ee01 GIT binary patch literal 6148 zcmeHKL5tHs6n@jz-Gn0apdc(lz-z4=3+=&6wssF5ylg}dDm5`>4Q4Z?O)XLixi9)x z`~m(C|BildW>#!>y)B~h9=!Qx-n?(Zdkq2jN_-L*$o@c*g4Hwx1 zDqiDBq2H#3PBG>M#r}Q;_}#UrN2ioiwe$XtFxUHT%xt7hXOtkXq!5gpX7myLbcgk2 zht&j2Q?{L@?p~dht`;-*1$|9tMZTyG55K8Kvvp%{-`n@v-s||CUd2^XEf=F?{*p(} zv@X(%ev&@Vr>jZl)?-~(NnTFphLC4dq`Z2OmziFT^s>wrh8x=n&-eUE=U}}K`@=yu zxE~Jsn{KcU9}fE6U^omn8{fNq@4=&!$@}80)SrwTr0~%jyXo)(KBMEd{UM&0g)UDK z;cTBy=$MXZOizJ5NV6-1w?^=UI9KI0ytyj zu(oK94m73&0Jab|hQ9gr2L>DfMhh`^Mk0xea!5<|JlL0LNHBbQ%Wv~*JD$ymod zS-A>DxxzyQCY@AdQCd+z6xddvX@?!Y|BruP|8J9IBnpTE|CIu&HIBz4Y{}iNmo~?D uZ2*4*XXCuu;!g@X<|;-mU&VLe#t;v<1B@Kj77>BTkARUu8d2bnD)0k~;CcH1 literal 0 HcmV?d00001 diff --git a/main.ipynb b/main.ipynb index b05630a..842ef81 100644 --- a/main.ipynb +++ b/main.ipynb @@ -20,7 +20,7 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 194, "metadata": {}, "outputs": [], "source": [ @@ -42,28 +42,37 @@ "outputs": [], "source": [ "def greater(a,b):\n", - "#your code here" + "#your code here\n", + " if a > b:\n", + " return a\n", + " elif b > a:\n", + " return b\n", + " else:\n", + " return 'Equals'" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 201, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.135s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_greater(greater)" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "#your code here" - ] - }, { "cell_type": "markdown", "metadata": {}, @@ -73,18 +82,41 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 211, "metadata": {}, "outputs": [], "source": [ - "#your code here" + "def greatest(lst):\n", + " \n", + " maior = lst[0]\n", + " i = 1\n", + " while True:\n", + " try:\n", + " if lst[i] > maior:\n", + " maior = lst[i]\n", + " i += 1\n", + " except IndexError:\n", + " \n", + " return maior" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 212, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.122s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_greatest(greatest)" @@ -99,21 +131,41 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 213, "metadata": {}, "outputs": [], "source": [ "def sum_all(lst):\n", - "#your code here" + " total = 0\n", + " i = 0\n", + "\n", + " while True:\n", + " try:\n", + " total += lst[i]\n", + " i += 1\n", + " except IndexError:\n", + " return total" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 214, "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.111s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_sum(sum_all)" @@ -128,21 +180,42 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 223, "metadata": {}, "outputs": [], "source": [ "def mult_all(lst):\n", - "#your code here" + "#your code here\n", + " prod = 1\n", + " i = 0\n", + "\n", + " while True:\n", + " try:\n", + " prod *= lst[i]\n", + " i += 1\n", + " except IndexError:\n", + " return prod" ] }, { "cell_type": "code", - "execution_count": null, + "execution_count": 224, "metadata": { "scrolled": true }, - "outputs": [], + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.117s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_mult(mult_all)" @@ -157,19 +230,48 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 233, "metadata": {}, "outputs": [], "source": [ - "def oper_all(arr, oper = \"*\"):\n", - "#your code here" + "def oper_all(lst, oper):\n", + " if oper == \"+\":\n", + " total = 0\n", + " i = 0\n", + " while True:\n", + " try:\n", + " total += lst[i]\n", + " i += 1\n", + " except IndexError:\n", + " return total\n", + " else:\n", + " prod = 1\n", + " i = 0\n", + " while True:\n", + " try:\n", + " prod *= lst[i]\n", + " i += 1\n", + " except IndexError:\n", + " return prod\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 234, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.136s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_operations(oper_all)" @@ -184,12 +286,16 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 237, "metadata": {}, "outputs": [], "source": [ "def factorial(n):\n", - "#your code here" + " result = 1\n", + " for i in range(1, n + 1):\n", + " result *= i\n", + " return result\n", + "\n" ] }, { @@ -213,9 +319,21 @@ }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 238, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.129s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_factorial(factorial)" @@ -232,19 +350,55 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 242, "metadata": {}, "outputs": [], "source": [ - "def unique(lst_un):\n", - "#your code here" + "def unique_values(lst):\n", + " uniques = []\n", + " i = 0\n", + "\n", + " while True:\n", + " try:\n", + " value = lst[i]\n", + " \n", + " j = 0\n", + " already_exists = False\n", + " while True:\n", + " try:\n", + " if uniques[j] == value:\n", + " already_exists = True\n", + " break\n", + " j += 1\n", + " except IndexError:\n", + " break\n", + " \n", + " \n", + " if not already_exists:\n", + " uniques += [value]\n", + " \n", + " i += 1\n", + " except IndexError:\n", + " return uniques\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 243, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.260s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_unique(unique)" @@ -260,19 +414,71 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 244, "metadata": {}, "outputs": [], "source": [ - "def mode_counter(arr):\n", - "#your code here" + "def mode(lst):\n", + " uniques = []\n", + " counts = []\n", + " i = 0\n", + "\n", + " while True:\n", + " try:\n", + " value = lst[i]\n", + "\n", + " j = 0\n", + " exists = False\n", + " while True:\n", + " try:\n", + " if uniques[j] == value:\n", + " counts[j] += 1\n", + " exists = True\n", + " break\n", + " j += 1\n", + " except IndexError:\n", + " break\n", + " \n", + " if not exists:\n", + " uniques += [value]\n", + " counts += [1]\n", + "\n", + " i += 1\n", + " except IndexError:\n", + " break\n", + " \n", + " max_count = counts[0]\n", + " mode_value = uniques[0]\n", + " k = 1\n", + " while True:\n", + " try:\n", + " if counts[k] > max_count:\n", + " max_count = counts[k]\n", + " mode_value = uniques[k]\n", + " k += 1\n", + " except IndexError:\n", + " break\n", + "\n", + " return mode_value\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 245, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.129s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_mode(mode_counter)" @@ -288,19 +494,48 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 298, "metadata": {}, "outputs": [], "source": [ "def st_dev(list_sd):\n", - "#your code here" + " total = 0\n", + " count = 0\n", + " for x in list_sd:\n", + " total+= x\n", + " count += 1\n", + " if count == 0:\n", + " return 0.0\n", + " mean = total / count\n", + " \n", + " ss = 0\n", + " for x in list_sd:\n", + " d = x - mean\n", + " ss += d * d\n", + " \n", + " if count == 1:\n", + " return 0.0\n", + " variance = ss / (count - 1)\n", + " return variance ** 0.5\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 299, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.155s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_stdev(st_dev)" @@ -315,19 +550,57 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 306, "metadata": {}, "outputs": [], "source": [ - "def pangram(string):\n", - "#your code here" + "def pangram(s):\n", + " alphabet = \"abcdefghijklmnopqrstuvwxyz\"\n", + " found = \"\"\n", + "\n", + " i = 0\n", + " while True:\n", + " try:\n", + " c = s[i]\n", + " if 'A' <= c <= 'Z':\n", + " c = chr(ord(c) + 32)\n", + " if 'a' <= c <= 'z':\n", + " if c not in found:\n", + " found += c\n", + " i += 1\n", + " except IndexError:\n", + " break\n", + "\n", + " j = 0\n", + " while True:\n", + " try:\n", + " if alphabet[j] not in found:\n", + " return False\n", + " j += 1\n", + " except IndexError:\n", + " break\n", + "\n", + " return True\n", + "\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 307, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "..............................\n", + "----------------------------------------------------------------------\n", + "Ran 30 tests in 0.026s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_pangram(pangram)" @@ -344,19 +617,60 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 304, "metadata": {}, "outputs": [], "source": [ - "def sort_alpha(string):\n", - "#your code here" + "def sort_alpha(s):\n", + " words = []\n", + " word = \"\"\n", + " i = 0\n", + " while True:\n", + " try:\n", + " c = s[i]\n", + " if c == \",\":\n", + " words += [word]\n", + " word = \"\"\n", + " else:\n", + " word += c\n", + " i += 1\n", + " except IndexError:\n", + " words += [word]\n", + " break\n", + "\n", + " words_sorted = sorted(words)\n", + "\n", + " result = \"\"\n", + " j = 0\n", + " while True:\n", + " try:\n", + " result += words_sorted[j]\n", + " if j != len(words_sorted) - 1:\n", + " result += \",\"\n", + " j += 1\n", + " except IndexError:\n", + " break\n", + "\n", + " return result\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 305, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.127s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_alpha(sort_alpha)" @@ -371,19 +685,64 @@ }, { "cell_type": "code", - "execution_count": null, + "execution_count": 302, "metadata": {}, "outputs": [], "source": [ - "def check_pass(password):\n", - "#your code here" + "def check_pass(pw):\n", + " if len(pw) < 8:\n", + " return False\n", + "\n", + " has_lower = False\n", + " has_upper = False\n", + " has_digit = False\n", + " has_special = False\n", + " specials = \"#@!$%&()^*[]{}\"\n", + "\n", + " i = 0\n", + " while True:\n", + " try:\n", + " c = pw[i]\n", + " if 'a' <= c <= 'z':\n", + " has_lower = True\n", + " elif 'A' <= c <= 'Z':\n", + " has_upper = True\n", + " elif '0' <= c <= '9':\n", + " has_digit = True\n", + " else:\n", + " j = 0\n", + " while True:\n", + " try:\n", + " if c == specials[j]:\n", + " has_special = True\n", + " break\n", + " j += 1\n", + " except IndexError:\n", + " break\n", + " i += 1\n", + " except IndexError:\n", + " break\n", + "\n", + " return has_lower and has_upper and has_digit and has_special\n" ] }, { "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], + "execution_count": 303, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "....................................................................................................\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.111s\n", + "\n", + "OK\n" + ] + } + ], "source": [ "# This will test your function \n", "test_pass(check_pass)" diff --git a/main1.ipynb b/main1.ipynb new file mode 100644 index 0000000..d2b6dcd --- /dev/null +++ b/main1.ipynb @@ -0,0 +1,1443 @@ +{ + "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": 143, + "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": 192, + "metadata": {}, + "outputs": [], + "source": [ + "def greater(a,b):\n", + "\n", + " i = 0\n", + " try:\n", + " while True:\n", + " lista[i]\n", + " i += 1\n", + " except IndexError:\n", + " return i" + ] + }, + { + "cell_type": "code", + "execution_count": 193, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 587 : Should be 587\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -528 : Should be -528\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 608 : Should be 608\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 590 : Should be 590\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 24 : Should be 24\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 841 : Should be 841\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 841 : Should be 841\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 914 : Should be 914\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 109 : Should be 109\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 523 : Should be 523\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 641 : Should be 641\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 421 : Should be 421\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -53 : Should be -53\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 529 : Should be 529\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 436 : Should be 436\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -352 : Should be -352\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 585 : Should be 585\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 349 : Should be 349\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 956 : Should be 956\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 347 : Should be 347\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 244 : Should be 244\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -139 : Should be -139\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 546 : Should be 546\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 741 : Should be 741\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 596 : Should be 596\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 745 : Should be 745\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 695 : Should be 695\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 567 : Should be 567\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 414 : Should be 414\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 89 : Should be 89\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -155 : Should be -155\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 88 : Should be 88\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 705 : Should be 705\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 905 : Should be 905\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 255 : Should be 255\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 702 : Should be 702\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -201 : Should be -201\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 273 : Should be 273\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 509 : Should be 509\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 441 : Should be 441\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -144 : Should be -144\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 992 : Should be 992\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 741 : Should be 741\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 307 : Should be 307\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 405 : Should be 405\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 365 : Should be 365\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 796 : Should be 796\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -738 : Should be -738\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 937 : Should be 937\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 960 : Should be 960\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 783 : Should be 783\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 595 : Should be 595\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 555 : Should be 555\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 723 : Should be 723\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 873 : Should be 873\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 96 : Should be 96\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 767 : Should be 767\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 594 : Should be 594\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 814 : Should be 814\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 8 : Should be 8\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -601 : Should be -601\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -529 : Should be -529\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 474 : Should be 474\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 932 : Should be 932\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 534 : Should be 534\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 721 : Should be 721\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 672 : Should be 672\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 104 : Should be 104\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -42 : Should be -42\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 888 : Should be 888\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 356 : Should be 356\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -310 : Should be -310\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -41 : Should be -41\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 267 : Should be 267\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 799 : Should be 799\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 587 : Should be 587\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 973 : Should be 973\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 341 : Should be 341\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 98 : Should be 98\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 34 : Should be 34\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 35 : Should be 35\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -146 : Should be -146\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -232 : Should be -232\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 838 : Should be 838\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 422 : Should be 422\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -86 : Should be -86\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -698 : Should be -698\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 243 : Should be 243\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 326 : Should be 326\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 373 : Should be 373\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 106 : Should be 106\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -622 : Should be -622\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 217 : Should be 217\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 328 : Should be 328\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 788 : Should be 788\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 253 : Should be 253\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 753 : Should be 753\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != 783 : Should be 783\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -1 : Should be -1\n", + "\n", + "======================================================================\n", + "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", + " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", + " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", + "AssertionError: 5 != -152 : Should be -152\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.273s\n", + "\n", + "FAILED (failures=100)\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greater(greater)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Now write a function that returns the largest element on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 123, + "metadata": {}, + "outputs": [ + { + "ename": "_IncompleteInputError", + "evalue": "incomplete input (2832516929.py, line 3)", + "output_type": "error", + "traceback": [ + "\u001b[0;36m Cell \u001b[0;32mIn[184], line 3\u001b[0;36m\u001b[0m\n\u001b[0;31m def largest(lista):\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31m_IncompleteInputError\u001b[0m\u001b[0;31m:\u001b[0m incomplete input\n" + ] + } + ], + "source": [ + "lista = [3, 7, 2, 9, 5]\n", + "\n", + "def largest(lista):\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3. Write a function that sums all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 124, + "metadata": {}, + "outputs": [], + "source": [ + "def sum_all(lst):\n", + "#your code here\n", + " result = 0\n", + " for i in lst:\n", + " result += i\n", + " return result" + ] + }, + { + "cell_type": "code", + "execution_count": 125, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "26" + ] + }, + "execution_count": 169, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# This will test your function \n", + "lst = [3, 7, 2, 9, 5]\n", + "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": 126, + "metadata": {}, + "outputs": [], + "source": [ + "def mult_all(lst):\n", + "#your code here\n", + "\n", + " result = 1\n", + " for i in lst:\n", + " result *= i\n", + " return result" + ] + }, + { + "cell_type": "code", + "execution_count": 127, + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/plain": [ + "1890" + ] + }, + "execution_count": 127, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "# This will test your function \n", + "lst = [3, 7, 2, 9, 5]\n", + "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": 128, + "metadata": {}, + "outputs": [], + "source": [ + "def oper_all(arr, oper = \"*\"):\n", + "#your code here\n", + "\n", + " if oper =='*':\n", + " result = 1\n", + " for i in arr:\n", + " result *= i\n", + " return result\n", + " elif oper == '+':\n", + " result = 0\n", + " for i in arr:\n", + " result += i\n", + " return result\n", + " else:\n", + " return 'Use \"*\" or \"+\" operators'" + ] + }, + { + "cell_type": "code", + "execution_count": 129, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "51\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "print(oper_all([1,2,3,5,9,10,21], '+'))" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 6. Write a function that returns the factorial of a number." + ] + }, + { + "cell_type": "code", + "execution_count": 130, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "479001600" + ] + }, + "execution_count": 130, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "def factorial(n):\n", + " if n == 0 or n == 1:\n", + " return 1\n", + " elif n < 0:\n", + " return 'invalid number'\n", + " else:\n", + " return n*factorial(n-1)\n", + "\n", + "factorial(12)" + ] + }, + { + "cell_type": "code", + "execution_count": 131, + "metadata": {}, + "outputs": [], + "source": [ + "#factorial formula\n", + "#n! = n * ( n - 1 ) *...*1\n", + "\n", + "# This code defines a function called \"factorial\" which takes an input \"n\". The function uses a for loop to iterate through the range of numbers \n", + "# from 1 to n+1. For each number in that range, it multiplies the current value of x by the number in the range. At the end of the loop, \n", + "# the function returns the final value of x, which will be the factorial of the input number \"n\".\n", + "\n", + "# The Factorial of a positive integer n is the product of all positive integers less than or equal to n. \n", + "# For example, the factorial of 6 (written \"6!\") is 6 * 5 * 4 * 3 * 2 * 1 = 720.\n", + "\n", + "# So this function takes an input of any positive integer, and returns the factorial of that number." + ] + }, + { + "cell_type": "code", + "execution_count": 132, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "120\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "print(factorial(5))" + ] + }, + { + "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": 141, + "metadata": {}, + "outputs": [], + "source": [ + "def unique(lst_un):\n", + "#your code here\n", + " return list(set(lst_un))\n" + ] + }, + { + "cell_type": "code", + "execution_count": 134, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "print(unique([1,1,5,9,1,5,5,6,3,9,4,5,2,6,7,9,6,3,1,1,4,5,8,8,9,6,7,7,4,6,2,1,9,5,1,1,5,5,]))" + ] + }, + { + "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", + "\n", + "NOTE: You should not use count... 🧐" + ] + }, + { + "cell_type": "code", + "execution_count": 151, + "metadata": {}, + "outputs": [], + "source": [ + "def mode_counter(arr):\n", + "#your code here\n", + " freq = {}\n", + " \n", + " for item in arr:\n", + " if item in freq:\n", + " freq[item] += 1\n", + " else:\n", + " freq[item] = 1\n", + " max_count = max(freq.values())\n", + " \n", + " for key, value in freq.items():\n", + " if value == max_count:\n", + " return key\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "5\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "print(mode_counter([1,5,5,6,3,9,4,5,2,6,7,9,6,3,1,1,4,5,8,8,9,6,7,7,5,5,]))" + ] + }, + { + "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": null, + "metadata": {}, + "outputs": [], + "source": [ + "my_lista = [1,5,5,6,3,9,4,5,2,6,7,9,6,3,1,1,4,5,8,8,9,6,7,7,5,5,]\n", + "\n", + "def st_dev(list_sd):\n", + " med = sum(list_sd) / len(list_sd)\n", + " sum_square = 0\n", + " for x in list_sd:\n", + " sum_square += (x - med) ** 2\n", + " variance = sum_square / len(list_sd) \n", + " std_devi = variance ** 0.5\n", + " return std_devi" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "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": null, + "metadata": {}, + "outputs": [], + "source": [ + "def pangram(string):\n", + "#your code here" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "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": null, + "metadata": {}, + "outputs": [], + "source": [ + "def sort_alpha(string):\n", + "#your code here" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "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": null, + "metadata": {}, + "outputs": [], + "source": [ + "def check_pass(password):\n", + "#your code here" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_pass(check_pass)" + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "base", + "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.13.5" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/mod/__pycache__/testing.cpython-313.pyc b/mod/__pycache__/testing.cpython-313.pyc new file mode 100644 index 0000000000000000000000000000000000000000..781030dcb80fb9ab53b184f26f8c65088deced0d GIT binary patch literal 20211 zcmeHPeNbE1m4EL^0s%tcFZ>Y)KQP!AG#YNi)gR-K4WP_O2nD-MXoF?d^7^I7w&SPG%w@f-`Emo!O6>@?T=IY2DeG z>^b*+Nmw%24JFx$W^~^DdiS0C@y_qubI*M<`T4mF{4TEl@19TBG0cBrME!9}U}gjY zFEe(=&NeVazOsacIM=|{8;F6&G(&^2-b73^Y;4G?&nDURW@4ssQ$tRDF3GLWBYE`} zVu7@*H4MqOX9Km`%|Hw6IY0~Txj>iL^MEe3TYxUJ=L21Cw*p;J#n=muvZTmf2(gv+ zB|ul%mjYeg&DxetBfCvDHjza{PuML&D90_F<1jgxZJeE5 z!}OZ%oKr2$w5WZkr7+BPydQpjrlfL4IW3u%GTW7CfOTf8Id;Q#g`Z{2Av?naIHy_7 zYoTMQ#^h@$V>jAO+Z8_UrEGt#gKf!Atqo(Xrc&nEwkpn9pypvr;$r#dpW6*tp*3v0mG&aBF`Kv^sAgQ$9TV1Pd78hHjNo!f`(!0 zCCo0DFW?KgTnUpe&>s#ZvV!3dT*piaqa^yh1RqG214-m)tR-?>F1KHhB$rDvK^D*R z!^4T4RSrocQdOVeu6mLL1BV3n38|{Rx~i_G$}ei0AHZH zvVVvy#RqJfqem)LUh|;z%o-rSA7(zZEP26pt~F+Pc+yhw!Rq4Y>OWY+f2Uyva+#Eu zDGL&4?}Z?+n|+yaFfGY18{PoFRu*2cw6D?*Oi%Ob*kQ!erCXUAPJR7&2Kt?A`a`b0 zCm8m7_%4wjGbHk$3q=yz|4dl$>m5DDks@Fu!FdA`4k15GR%1MygabGPiH&phlTr{T z{>)||&`lp$3U6B0#w=^U-!iiN(wg&Y&bdZCKRhvZ;@a^W#`p4mkvINqbeH3OOB-1W zHvkLTxR04}k_3c45hh8l%LOAB_G8%Mav|eNPJzqi^${uL_XWg2(B+~-O3IM&6);Ug zLdfTK384`2b%lX{xIbT+L~haVce%z4WEB)9E0L@RBH@(XGb}e=PPRY_z7;b#A8&ty z`IIx{l>9E2&1q+67^IYWT6Wq4MW$E%?`NM){}w75%T1WWFwe2)66RK*wJ3$@l(vU` zAu(YhLZDj&aV`Wr!9M70xcUO2M7H4ZVEKfhPZ&&CTgAZ;Mq9#x0K7g1=xSRQ`a{O9w(ng3ni$dVD$MfYg+X!(WScv1C~dF#g}#=7d0EXI_7)A+!I z@qxJU!JEdCn6YG}{C(pl+L0-*53-3PGV_lz78w;RGTsLk8Iz=Qnioo!&Ka@DN3lr5 zsd*rcVK!DQW7;^0t70S$unmOCJh07V&r)k?<{IHeL8J*70$c{{GJ+^E=*Z>J&{VBO z$C<_xpEqtv91m>^a9+liy)X#IC(UIkln%mBZY>0a5!40<$~UqChz>&ZC6m#_HWzmq zoFI~r2aurbOPTc=Xhb0Aen3MV;q(wOU+5sk$Q_TQ6i6~G$RaiwI@1nCrGg2dcBjPz z9rIO2DR z=Qb*y+mggHsfKa{^*yo`Nez;1K*mf|n35+jVGodmK_EnyrKoD4ELB8le#!uoX2?YZ znRyL}B1_w-ENx4XrEP3xSz7bRPm6w5{FCAv+>M&}qemudn&Z}^6E)4F!gD8|Kl80K z=fsh^sRCQ9runQPYCWopSHs2HQNx8p@uG?;bLHJd>+M@6rl5tL!Krn+jZ1MX*+4GY=y{5Fv94 zOIW8eRG2nu_fXY0jbOCp5?t4j9Z0^01ec!VQ6xK&>;jT7zyu+WV{|u?CLk0SlO(2D zZ3lT8aw&^Pv1|*F6d{BQEUN5X`64KL{zX#ujH;S;Kgu2&og4;xwz>jT>rxd0FjWK= zP~|f(jLNr`&Y-@qKdril({iz7QTg3C(}WRyXTIF3o-A}T41ucVQ4w$t(#QoPM}%=_k{J~pwmb5MO;kwJa@K$hH#Ycf9b#gW{&6izY|SYW7U{lIvgWzW`)%iFks z0k;bRMp)i!=4bsT*))wy{2fdh={~%G(miKkqKLmWvrFJfsC3w!|{6q6-sG@gLfxQ76J3qZM2t{!W$rkONS$d}k8432`1p82m zyvNlymG^rf0M>KX&h9+MFaqd`PL#~_=U`O*ri^i-6sA8r?1ngC(@xceVE@C|M8c4l z@`Sq~3h9Q@qz6bcnh>x9GKtEJy(J{iVHI0iu@V_uMyp@1k^2qIZ;Xv2PPkC?fbbEl zn+x_QKM<@D0VyGCLFwKT$VFvZ;(>tCyph?xEyW`D0QLFE);TFf`?D!~)$+0TNYUr=gWg}0m;C1+V(xo0oh zM)zLW951SxGHGu@`vEARDtGi>jEwQ&hezQ0d$(RkH< ze(6ZvrTX*r7mDK#Zn<1`_2C~qJig{e-FpqcXt?os^ogh5w;Z3Ry8msc8)tn$vF5p_Rp+on&W8ui_@%TSe`L6)+J#7iAaV z{PR_IliVm4)}{`QqUl8XAoR>)iFC!Lo}M#Jpbr6u83a0tRw~fH;L5IIQ_s*)MbE_* z^S$V~FGG18y>xo+^s|_O$}T};%=A_u^OLpMrE|zy#k38rAwPi91MruA2IM}q+lsAM zc3j>4=I-(JhUiJz~_` z6L3i{HhFV{I5LIV33)w^kh@wL8@&~ z7yNWG^)I2D7E7keieV+1`-0MJ_vQ==vy3$v`$dt#-+`w|=nSFi z%cU_(>G`cAo=d&wdoS$1yzT0)AMF|!ZbYKTJ8vErW5>nlQ{HG}chpikVd4STH^iR|4pc@qHDeycx`KoJfG^a; zdwnNG-V=<70p1UbVyM11+$~i`)*tlyy7=B8oIt<_Mq~!~P>?>;GawLeWn@D=ROb-} zB;Fr{YOr2kH!o?d$V>ottv#arBzP_ySb#@I1mcn4S$+L-d;CL{k+MU<0jwTM_=l8c zdIWEXkBD7FkV}_D%8t_ZN5uY~AtFI@g9DqDyLei<-q#1LwGIS%4}sPNlvebJ{(jyo z461Bmt12TE$Xc&3w3+Ysbz}byZk8X%gZnxb9SHhQir5Fx)RKtJ4&xw%dVCSu40;s7 z>l@^chJ_O%;e%bhA{^0x8!97JdzEHx1kQt9yiZbl&)oyfrrqj30S)y9;IZA6k*)1Q z$lb$ltQUj*&^tpV8#nWN{V>9aZm|6#D79j0$d4QRawXx zz^5KW8r?cyq1K~caqHY+bmGP%{oVPjmep#We$~r6j4co7>1qgZ0e>oI+7(7SIUQWD zz*%_KG7)!AXZ`eZ2rY#8Kb%(~LRz2DzXMhmOTUpl(K9or zX*idF$qX6}zAs;fWut8Jyh~dZt>y2rsfUrwZ;$>TpeT-EssdtWbMADcpGL=&guIHR zPW86JSj#*= zoG_u5A|;G?Nx%0jpLtTaAU}mi{Vn{ZUjw;~XP&Z5=%dHi$#|n zeC@$E{%oq`iP)3g7~eg$swYNH#a5nQcQQMTc{bK{Or0BnlmUJhlZr{pgN_yDa6DvQcgzq8QpzGEXsLV%*{rj0PCgXz&sgYDBs-C$f?Fa>3X+iMfup+peqTsOHS#Y|nEHg_X$kd! znY{j{Z6&{e0zbw=c6je7YGqT@LaL({#%7-``-EfKxu?007^Z{!I`;_!F@c+5nEWp8 zmK=es7S7I{wLgFCo5v=Dp~>*6-!aTdwhjy61q$rv4&db=_axqXlC8&@`q>7Itvrkc zF%s=P@dEkYz;_4UHNES7FYwDiw4*cX65>r=lZV{#b)Jbs?(yo2S(ox(%YP#{#qW+C za>v$rrdEm{%lE?tD*KdStc@Imk<;P*@L1q=HcXD#FC9C7><#bb)~m;VbbQ?KV^_R# zf4uxayy)PR`OsVl$&2i5;29o<7pPu(2s-yVSF`^C3sJEd%7Yv}lIbjLZFCTr*qM!0`(a(0+O!R9K z}GwpO$sc!2h^!l#2W8nlh7Pck)X8=4}^4uBC6EMyXoeJ~It9TN1;;Zhw845ohiXWj2UKLwZ9XbZ1+y~1YmHVfuV*G zKLA4wIzVYH>HruSXD_aYPkn5-aN^4P%fgR0#5Ozpch;h#laLVXX8RmMDG-lRCIgd{%KM#crsH%8|dW*jr+jkM&;x zW~XWY6k-UWnM?w?SCvic$Jx&B*(ew!24kpK$e)J(xrl&ws@b&Q1yOm1=aV zN+)lPV@H#JhrGA25U*==sA^@K>bPW$u8y0n(S6J@1)bdRLD1})IfvY5Pho#HbH}lp z@}1Z}7=hku;0|+VTb^(KX8UAM-((A~Ga`|)m! zMBSd3yx;44vG3xM%X?#G+ph#;W&7Xp#>x&y8#`iU9aBY}Ff>>aE^r&_Z3i%nkCyc| z=bd_6`)KQhj(AbclzH1+S{l?z)iWn2n=(u_b@|5Yk33Rmw!XC`55n)5O+amHWK|s1 zZuklse{^h@*{1$+Sw_8X|PZX%a{1qi6{npyK3rt~+=t{AiHR#rZ1yH%_ao`wn`tqenQRLd>4TB?T4w|EO=t%cN? LVk>K-Lh}CrFl>}! literal 0 HcmV?d00001 From 870cd26f837677e84bc5aa90fcce9ceac9badcbd Mon Sep 17 00:00:00 2001 From: rafaeldr5150 Date: Wed, 8 Oct 2025 17:00:21 +0200 Subject: [PATCH 2/2] Delete main1.ipynb --- main1.ipynb | 1443 --------------------------------------------------- 1 file changed, 1443 deletions(-) delete mode 100644 main1.ipynb diff --git a/main1.ipynb b/main1.ipynb deleted file mode 100644 index d2b6dcd..0000000 --- a/main1.ipynb +++ /dev/null @@ -1,1443 +0,0 @@ -{ - "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": 143, - "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": 192, - "metadata": {}, - "outputs": [], - "source": [ - "def greater(a,b):\n", - "\n", - " i = 0\n", - " try:\n", - " while True:\n", - " lista[i]\n", - " i += 1\n", - " except IndexError:\n", - " return i" - ] - }, - { - "cell_type": "code", - "execution_count": 193, - "metadata": {}, - "outputs": [ - { - "name": "stderr", - "output_type": "stream", - "text": [ - "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 587 : Should be 587\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -528 : Should be -528\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 608 : Should be 608\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 590 : Should be 590\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 24 : Should be 24\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 841 : Should be 841\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 841 : Should be 841\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 914 : Should be 914\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 109 : Should be 109\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 523 : Should be 523\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 641 : Should be 641\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 421 : Should be 421\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -53 : Should be -53\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 529 : Should be 529\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 436 : Should be 436\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -352 : Should be -352\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 585 : Should be 585\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 349 : Should be 349\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 956 : Should be 956\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 347 : Should be 347\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 244 : Should be 244\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -139 : Should be -139\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 546 : Should be 546\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 741 : Should be 741\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 596 : Should be 596\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 745 : Should be 745\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 695 : Should be 695\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 567 : Should be 567\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 414 : Should be 414\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 89 : Should be 89\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -155 : Should be -155\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 88 : Should be 88\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 705 : Should be 705\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 905 : Should be 905\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 255 : Should be 255\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 702 : Should be 702\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -201 : Should be -201\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 273 : Should be 273\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 509 : Should be 509\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 441 : Should be 441\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -144 : Should be -144\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 992 : Should be 992\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 741 : Should be 741\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 307 : Should be 307\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 405 : Should be 405\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 365 : Should be 365\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 796 : Should be 796\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -738 : Should be -738\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 937 : Should be 937\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 960 : Should be 960\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 783 : Should be 783\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 595 : Should be 595\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 555 : Should be 555\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 723 : Should be 723\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 873 : Should be 873\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 96 : Should be 96\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 767 : Should be 767\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 594 : Should be 594\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 814 : Should be 814\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 8 : Should be 8\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -601 : Should be -601\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -529 : Should be -529\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 474 : Should be 474\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 932 : Should be 932\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 534 : Should be 534\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 721 : Should be 721\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 672 : Should be 672\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 104 : Should be 104\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -42 : Should be -42\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 888 : Should be 888\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 356 : Should be 356\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -310 : Should be -310\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -41 : Should be -41\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 267 : Should be 267\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 799 : Should be 799\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 587 : Should be 587\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 973 : Should be 973\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 341 : Should be 341\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 98 : Should be 98\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 34 : Should be 34\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 35 : Should be 35\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -146 : Should be -146\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -232 : Should be -232\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 838 : Should be 838\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 422 : Should be 422\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -86 : Should be -86\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -698 : Should be -698\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 243 : Should be 243\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 326 : Should be 326\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 373 : Should be 373\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 106 : Should be 106\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -622 : Should be -622\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 217 : Should be 217\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 328 : Should be 328\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 788 : Should be 788\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 253 : Should be 253\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 753 : Should be 753\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != 783 : Should be 783\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -1 : Should be -1\n", - "\n", - "======================================================================\n", - "FAIL: runTest (mod.testing.test_greater..TestKnown.runTest)\n", - "----------------------------------------------------------------------\n", - "Traceback (most recent call last):\n", - " File \"/Users/mac/IronHacks/W1/D3/lab-functions-en/mod/testing.py\", line 17, in runTest\n", - " self.assertEqual(fn(*self.input), self.output, f\"Should be {self.output}\")\n", - " ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", - "AssertionError: 5 != -152 : Should be -152\n", - "\n", - "----------------------------------------------------------------------\n", - "Ran 100 tests in 0.273s\n", - "\n", - "FAILED (failures=100)\n" - ] - } - ], - "source": [ - "# This will test your function \n", - "test_greater(greater)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 2. Now write a function that returns the largest element on a list" - ] - }, - { - "cell_type": "code", - "execution_count": 123, - "metadata": {}, - "outputs": [ - { - "ename": "_IncompleteInputError", - "evalue": "incomplete input (2832516929.py, line 3)", - "output_type": "error", - "traceback": [ - "\u001b[0;36m Cell \u001b[0;32mIn[184], line 3\u001b[0;36m\u001b[0m\n\u001b[0;31m def largest(lista):\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31m_IncompleteInputError\u001b[0m\u001b[0;31m:\u001b[0m incomplete input\n" - ] - } - ], - "source": [ - "lista = [3, 7, 2, 9, 5]\n", - "\n", - "def largest(lista):\n" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 3. Write a function that sums all the elements on a list" - ] - }, - { - "cell_type": "code", - "execution_count": 124, - "metadata": {}, - "outputs": [], - "source": [ - "def sum_all(lst):\n", - "#your code here\n", - " result = 0\n", - " for i in lst:\n", - " result += i\n", - " return result" - ] - }, - { - "cell_type": "code", - "execution_count": 125, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "26" - ] - }, - "execution_count": 169, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# This will test your function \n", - "lst = [3, 7, 2, 9, 5]\n", - "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": 126, - "metadata": {}, - "outputs": [], - "source": [ - "def mult_all(lst):\n", - "#your code here\n", - "\n", - " result = 1\n", - " for i in lst:\n", - " result *= i\n", - " return result" - ] - }, - { - "cell_type": "code", - "execution_count": 127, - "metadata": { - "scrolled": true - }, - "outputs": [ - { - "data": { - "text/plain": [ - "1890" - ] - }, - "execution_count": 127, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "# This will test your function \n", - "lst = [3, 7, 2, 9, 5]\n", - "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": 128, - "metadata": {}, - "outputs": [], - "source": [ - "def oper_all(arr, oper = \"*\"):\n", - "#your code here\n", - "\n", - " if oper =='*':\n", - " result = 1\n", - " for i in arr:\n", - " result *= i\n", - " return result\n", - " elif oper == '+':\n", - " result = 0\n", - " for i in arr:\n", - " result += i\n", - " return result\n", - " else:\n", - " return 'Use \"*\" or \"+\" operators'" - ] - }, - { - "cell_type": "code", - "execution_count": 129, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "51\n" - ] - } - ], - "source": [ - "# This will test your function \n", - "print(oper_all([1,2,3,5,9,10,21], '+'))" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "## 6. Write a function that returns the factorial of a number." - ] - }, - { - "cell_type": "code", - "execution_count": 130, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "479001600" - ] - }, - "execution_count": 130, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "def factorial(n):\n", - " if n == 0 or n == 1:\n", - " return 1\n", - " elif n < 0:\n", - " return 'invalid number'\n", - " else:\n", - " return n*factorial(n-1)\n", - "\n", - "factorial(12)" - ] - }, - { - "cell_type": "code", - "execution_count": 131, - "metadata": {}, - "outputs": [], - "source": [ - "#factorial formula\n", - "#n! = n * ( n - 1 ) *...*1\n", - "\n", - "# This code defines a function called \"factorial\" which takes an input \"n\". The function uses a for loop to iterate through the range of numbers \n", - "# from 1 to n+1. For each number in that range, it multiplies the current value of x by the number in the range. At the end of the loop, \n", - "# the function returns the final value of x, which will be the factorial of the input number \"n\".\n", - "\n", - "# The Factorial of a positive integer n is the product of all positive integers less than or equal to n. \n", - "# For example, the factorial of 6 (written \"6!\") is 6 * 5 * 4 * 3 * 2 * 1 = 720.\n", - "\n", - "# So this function takes an input of any positive integer, and returns the factorial of that number." - ] - }, - { - "cell_type": "code", - "execution_count": 132, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "120\n" - ] - } - ], - "source": [ - "# This will test your function \n", - "print(factorial(5))" - ] - }, - { - "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": 141, - "metadata": {}, - "outputs": [], - "source": [ - "def unique(lst_un):\n", - "#your code here\n", - " return list(set(lst_un))\n" - ] - }, - { - "cell_type": "code", - "execution_count": 134, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "[1, 2, 3, 4, 5, 6, 7, 8, 9]\n" - ] - } - ], - "source": [ - "# This will test your function \n", - "print(unique([1,1,5,9,1,5,5,6,3,9,4,5,2,6,7,9,6,3,1,1,4,5,8,8,9,6,7,7,4,6,2,1,9,5,1,1,5,5,]))" - ] - }, - { - "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", - "\n", - "NOTE: You should not use count... 🧐" - ] - }, - { - "cell_type": "code", - "execution_count": 151, - "metadata": {}, - "outputs": [], - "source": [ - "def mode_counter(arr):\n", - "#your code here\n", - " freq = {}\n", - " \n", - " for item in arr:\n", - " if item in freq:\n", - " freq[item] += 1\n", - " else:\n", - " freq[item] = 1\n", - " max_count = max(freq.values())\n", - " \n", - " for key, value in freq.items():\n", - " if value == max_count:\n", - " return key\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "5\n" - ] - } - ], - "source": [ - "# This will test your function \n", - "print(mode_counter([1,5,5,6,3,9,4,5,2,6,7,9,6,3,1,1,4,5,8,8,9,6,7,7,5,5,]))" - ] - }, - { - "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": null, - "metadata": {}, - "outputs": [], - "source": [ - "my_lista = [1,5,5,6,3,9,4,5,2,6,7,9,6,3,1,1,4,5,8,8,9,6,7,7,5,5,]\n", - "\n", - "def st_dev(list_sd):\n", - " med = sum(list_sd) / len(list_sd)\n", - " sum_square = 0\n", - " for x in list_sd:\n", - " sum_square += (x - med) ** 2\n", - " variance = sum_square / len(list_sd) \n", - " std_devi = variance ** 0.5\n", - " return std_devi" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "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": null, - "metadata": {}, - "outputs": [], - "source": [ - "def pangram(string):\n", - "#your code here" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "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": null, - "metadata": {}, - "outputs": [], - "source": [ - "def sort_alpha(string):\n", - "#your code here" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "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": null, - "metadata": {}, - "outputs": [], - "source": [ - "def check_pass(password):\n", - "#your code here" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "# This will test your function \n", - "test_pass(check_pass)" - ] - } - ], - "metadata": { - "kernelspec": { - "display_name": "base", - "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.13.5" - } - }, - "nbformat": 4, - "nbformat_minor": 4 -}