From 486646313cb57bf912699e8a32e1820b38264dd1 Mon Sep 17 00:00:00 2001 From: david arenas Date: Sun, 12 Oct 2025 19:29:14 +0200 Subject: [PATCH 1/2] solucion del lab de funciones --- solucion_funciones.ipynb | 1652 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 1652 insertions(+) create mode 100644 solucion_funciones.ipynb diff --git a/solucion_funciones.ipynb b/solucion_funciones.ipynb new file mode 100644 index 0000000..2ef69d0 --- /dev/null +++ b/solucion_funciones.ipynb @@ -0,0 +1,1652 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Functions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "On this lab we will put to practice some of the concepts we have learned on this past few days.\n", + "\n", + "`NOTE: On this lab you should try to write all the functions yourself using only the most basic of python syntax and without functions such as len, count, sum, max, min, in, etc. Give it a try. 🧑🏻‍💻👩🏻‍💻`\n", + "\n", + "The cell after each exercise contains a few tests to check if your function works as expected." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from mod.testing import *\n", + "import unittest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Write a function that returns the greater of two numbers" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "El primer numero 80.0 es menor que 81.0\n" + ] + } + ], + "source": [ + "#your code here\n", + "def greater():\n", + " a = float(input(\"Ingresa el primer numero\"))\n", + " b = float(input(\"Ingresa el segundo numero\"))\n", + " if a > b:\n", + " print(f\"El primer numero {a} es mayor que {b}\")\n", + " elif b > a:\n", + " print(f\"El primer numero {a} es menor que {b}\")\n", + " else:\n", + " print(f\"el numero {a} y el numero {b} son iguales\")\n", + " \n", + "resultado = greater()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.245s\n", + "\n", + "FAILED (errors=100)\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greater(greater)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "#your code here" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Now write a function that returns the largest element on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [20, 101, 30, 107, 165]\n", + "El numero mayor de la lista es: 165\n" + ] + } + ], + "source": [ + "#your code here\n", + "import random as rm\n", + "def greatest(lst):\n", + " return max(lst) \n", + " \n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "mayor = greatest(lst)\n", + "print(\"La lista contiene: \", lst)\n", + "print(\"El numero mayor de la lista es:\", mayor)\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'greatest' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mNameError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[15]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# This will test your function \u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m test_greatest(\u001b[43mgreatest\u001b[49m)\n", + "\u001b[31mNameError\u001b[39m: name 'greatest' is not defined" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greatest(greatest)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3. Write a function that sums all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [190, 131, 197, 180, 142, 107, 140, 123, 10, 99, 54, 23, 71, 67, 133, 73, 146, 18, 92, 158, 30, 199, 68, 22, 147, 29, 175, 185, 103, 46, 158, 70, 118, 157, 197, 156, 59, 114, 57, 2, 42, 38, 84, 19, 139, 31, 117, 48, 48, 170, 13, 25, 24, 160, 62, 156, 22, 84]\n", + "El numero mayor de la lista es: 199\n", + "La sumatoria de la lista es: 5528\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def sum_all(lst):\n", + " n = 0\n", + " for i in lst:\n", + " n = n + i\n", + " return n\n", + "import random as rm\n", + "def greatest(lst):\n", + " return max(lst) \n", + " \n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "mayor = greatest(lst)\n", + "resultado = sum_all(lst)\n", + "print(\"La lista contiene: \", lst)\n", + "print(\"El numero mayor de la lista es:\", mayor)\n", + "print(\"La sumatoria de la lista es:\", resultado)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_sum(sum_all)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 4. Write another function that multiplies all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [65, 117, 89, 136, 30]\n", + "El numero mayor de la lista es: 136\n", + "los numeros multiplicados de la lista son: 2761527600\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def mult_all(lst): \n", + " n = 1 \n", + " for i in lst:\n", + " n = n * i\n", + " return n\n", + "import random as rm\n", + "def greatest(lst):\n", + " return max(lst) \n", + " \n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "mayor = greatest(lst)\n", + "resultado = mult_all(lst)\n", + "print(\"La lista contiene: \", lst)\n", + "print(\"El numero mayor de la lista es:\", mayor)\n", + "print(\"los numeros multiplicados de la lista son:\", resultado)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_mult(mult_all)" + ] + }, + { + "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": 46, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [58, 179, 128]\n", + "los numeros resultado de la operacion + es:365\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def oper_all(arr, oper = \"*\"):\n", + " if oper == \"+\":\n", + " n = 0\n", + " for i in lst:\n", + " n = n + i\n", + " elif oper == \"*\": \n", + " n = 1 \n", + " for i in lst:\n", + " n = n * i\n", + " else:\n", + " raise ValueError(\"Operacion invalida use '+' o '*'\")\n", + " return n\n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "oper = input(\"Ingrese '+' para sumar o '*' para multiplicar: \")\n", + "resultado = oper_all(list, oper)\n", + "\n", + "print(\"La lista contiene: \", lst)\n", + "print(f\"los numeros resultado de la operacion {oper} es:{resultado}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_operations(oper_all)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 6. Write a function that returns the factorial of a number." + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "El factorial de 5 es: 120\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + " \n", + "def factorial(n):\n", + " if n < 0:\n", + " raise ValueError(\"El factorial no esta definido para numeros negativos\")\n", + " result = 1\n", + " for i in range (1, n+1):\n", + " result = result * i\n", + " return result\n", + "num = int(input(\"Ingrese el numero para calcular el factorial:\"))\n", + "print(f\"\\nEl factorial de {num} es:\", factorial(num))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "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": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_factorial(factorial)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 7. Write a function that takes a list and returns a list of the unique values.\n", + "\n", + "`NOTE: You cannot use set. 🤔`" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista original es: [5, 5, 5, 6, 7, ['alpha', 'betha', 'gamma'], 8, 9, 9, 9, 5, 1, 2, 100, ['alpha', 'betha', 'gamma'], 45, 8, 2, 9, 50, 41, 45]\n", + "La lista con valores unicos es: [5, 6, 7, ['alpha', 'betha', 'gamma'], 8, 9, 1, 2, 100, 45, 50, 41]\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def unique(lst_un):\n", + " unique_values = []\n", + " for i in lst_un:\n", + " if i not in unique_values:\n", + " unique_values.append(i)\n", + " return unique_values\n", + "\n", + "lst = [5,5,5,6,7,[\"alpha\",\"betha\",\"gamma\"],8,9,9,9,5,1,2,100,[\"alpha\",\"betha\",\"gamma\"],45,8,2,9,50,41,45]\n", + "\n", + "print(\"La lista original es:\", lst)\n", + "print(\"La lista con valores unicos es:\",unique(lst))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_unique(unique)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 8. Write a function that returns the mode of a list, i.e.: the element that appears the most times.\n", + "`NOTE: You should not use count... 🧐`" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista es: [5, 3, 9, 5, 2, 5, 3, 3, 3, 7]\n", + "La moda de la lista es: 3\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def mode_counter(lst):\n", + " frecuencia = {}\n", + " for i in lst:\n", + " if i in frecuencia:\n", + " frecuencia[i] += 1\n", + " else: \n", + " frecuencia[i] = 1\n", + " max_frec = 0\n", + " moda_valor = None\n", + " for key, valor in frecuencia.items():\n", + " if valor > max_frec:\n", + " max_frec = valor\n", + " moda_valor = key\n", + " \n", + " return moda_valor\n", + "\n", + "mi_lista = [5, 3, 9, 5, 2, 5, 3, 3, 3, 7]\n", + "print(\"La lista es:\", mi_lista)\n", + "print(\"La moda de la lista es:\", mode_counter(mi_lista))\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_mode(mode_counter)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 9. Write a function that calculates the standard deviation of a list.\n", + "`NOTE: Do not use any libraries or already built functions. 😉`" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lista: [2, 4, 4, 4, 5, 5, 7, 9]\n", + "Desviación estándar: 2.0\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def st_dev(list_sd):\n", + " n = len(list_sd)\n", + " if n == 0: \n", + " return 0 \n", + " mean = sum(list_sd)/n\n", + " sum_diff_sq = 0\n", + " for x in list_sd:\n", + " sum_diff_sq += (x - mean)**2\n", + " return (sum_diff_sq/n)**0.5\n", + "\n", + "lista = [2, 4, 4, 4, 5, 5, 7, 9]\n", + "print(\"Lista:\", lista)\n", + "print(\"Desviación estándar:\", st_dev(lista))" + ] + }, + { + "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": 58, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "'El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro' es pangrama?: True\n", + "\n", + "'A buen entendedor, pocas palabras bastan' es pangrama?: False\n", + "\n", + "'Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!' es pangrama?: True\n", + "\n", + "'El sol brilló intensamente todo el día' es pangrama?: False\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def pangram(string):\n", + " string = string.lower()\n", + " \n", + " alfabeto=\"abcdefghijklmnopqrstuvwxyz\"\n", + " \n", + " for letra in alfabeto:\n", + " if letra not in string:\n", + " return False\n", + " return True\n", + "ejemplo1 = \"El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro\"\n", + "ejemplo2 = \"Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!\" \n", + "ejemplo3 = \"A buen entendedor, pocas palabras bastan\"\n", + "ejemplo4 = \"El sol brilló intensamente todo el día\"\n", + "\n", + "print(f\"\\n'{ejemplo1}' es pangrama?:\", pangram(ejemplo1))\n", + "print(f\"\\n'{ejemplo3}' es pangrama?:\", pangram(ejemplo3))\n", + "print(f\"\\n'{ejemplo2}' es pangrama?:\", pangram(ejemplo2))\n", + "print(f\"\\n'{ejemplo4}' es pangrama?:\", pangram(ejemplo4))\n" + ] + }, + { + "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": 66, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Original: banana,apple,cherry,date,murcielago,zorrillo,racoon\n", + "Ordenado: apple,banana,cherry,date,murcielago,racoon,zorrillo\n" + ] + } + ], + "source": [ + "#your code here\n", + "\n", + "def sort_alpha(string):\n", + " palabras = []\n", + " palabra = \"\"\n", + " \n", + " for i in string:\n", + " if i == \",\":\n", + " palabras.append(palabra)\n", + " palabra =\"\"\n", + " else:\n", + " palabra = palabra + i\n", + " \n", + " palabras.append(palabra)\n", + " \n", + " palabras_ordenadas = sorted(palabras)\n", + " \n", + " result = \"\"\n", + " \n", + " for i, w in enumerate(palabras_ordenadas):\n", + " result = result + w\n", + " if i != len(palabras_ordenadas) - 1:\n", + " result = result + \",\" \n", + " return result \n", + "\n", + "ejemplo = \"banana,apple,cherry,date,murcielago,zorrillo,racoon\"\n", + "print(\"Original:\", ejemplo)\n", + "print(\"Ordenado:\", sort_alpha(ejemplo))\n", + " \n", + " " + ] + }, + { + "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": 68, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "False\n", + "False\n", + "False\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def check_pass(password):\n", + " if len(password) < 8:\n", + " return False\n", + " minusculas = False\n", + " mayusculas = False\n", + " numeros = False\n", + " especiales = False\n", + "\n", + " digitos_especiales = \"!@#$%^&*()-_+=[]{}|:;,.<>?/`~\"\n", + " \n", + " for i in password:\n", + " if i.islower():\n", + " minusculas = True\n", + " elif i.isupper():\n", + " mayusculas = True\n", + " elif i.isdigit():\n", + " numeros = True\n", + " elif i in digitos_especiales:\n", + " especiales = True\n", + " return minusculas and mayusculas and numeros and especiales\n", + "\n", + "print(check_pass(\"Abc123!@\")) \n", + "print(check_pass(\"abcdefg\")) \n", + "print(check_pass(\"ABC12345\")) \n", + "print(check_pass(\"abcABC123\")) " + ] + }, + { + "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 +} From 796e986fff79a134c3f48b0831c389a4c0863936 Mon Sep 17 00:00:00 2001 From: david arenas Date: Sun, 12 Oct 2025 19:33:19 +0200 Subject: [PATCH 2/2] Solucion del LABORATORIO de funciones --- mod/solucion_funciones.ipynb | 1652 ++++++++++++++++++++++++++++++++++ 1 file changed, 1652 insertions(+) create mode 100644 mod/solucion_funciones.ipynb diff --git a/mod/solucion_funciones.ipynb b/mod/solucion_funciones.ipynb new file mode 100644 index 0000000..2ef69d0 --- /dev/null +++ b/mod/solucion_funciones.ipynb @@ -0,0 +1,1652 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Functions" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "On this lab we will put to practice some of the concepts we have learned on this past few days.\n", + "\n", + "`NOTE: On this lab you should try to write all the functions yourself using only the most basic of python syntax and without functions such as len, count, sum, max, min, in, etc. Give it a try. 🧑🏻‍💻👩🏻‍💻`\n", + "\n", + "The cell after each exercise contains a few tests to check if your function works as expected." + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "from mod.testing import *\n", + "import unittest" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 1. Write a function that returns the greater of two numbers" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "El primer numero 80.0 es menor que 81.0\n" + ] + } + ], + "source": [ + "#your code here\n", + "def greater():\n", + " a = float(input(\"Ingresa el primer numero\"))\n", + " b = float(input(\"Ingresa el segundo numero\"))\n", + " if a > b:\n", + " print(f\"El primer numero {a} es mayor que {b}\")\n", + " elif b > a:\n", + " print(f\"El primer numero {a} es menor que {b}\")\n", + " else:\n", + " print(f\"el numero {a} y el numero {b} son iguales\")\n", + " \n", + "resultado = greater()" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "EEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "======================================================================\n", + "ERROR: runTest (mod.testing.test_greater..TestKnown.runTest)\n", + "----------------------------------------------------------------------\n", + "Traceback (most recent call last):\n", + " File \"c:\\Users\\david\\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", + "TypeError: greater() takes 0 positional arguments but 2 were given\n", + "\n", + "----------------------------------------------------------------------\n", + "Ran 100 tests in 0.245s\n", + "\n", + "FAILED (errors=100)\n" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greater(greater)" + ] + }, + { + "cell_type": "code", + "execution_count": 23, + "metadata": {}, + "outputs": [], + "source": [ + "#your code here" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 2. Now write a function that returns the largest element on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 24, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [20, 101, 30, 107, 165]\n", + "El numero mayor de la lista es: 165\n" + ] + } + ], + "source": [ + "#your code here\n", + "import random as rm\n", + "def greatest(lst):\n", + " return max(lst) \n", + " \n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "mayor = greatest(lst)\n", + "print(\"La lista contiene: \", lst)\n", + "print(\"El numero mayor de la lista es:\", mayor)\n", + "\n", + "\n", + "\n" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "metadata": {}, + "outputs": [ + { + "ename": "NameError", + "evalue": "name 'greatest' is not defined", + "output_type": "error", + "traceback": [ + "\u001b[31m---------------------------------------------------------------------------\u001b[39m", + "\u001b[31mNameError\u001b[39m Traceback (most recent call last)", + "\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[15]\u001b[39m\u001b[32m, line 2\u001b[39m\n\u001b[32m 1\u001b[39m \u001b[38;5;66;03m# This will test your function \u001b[39;00m\n\u001b[32m----> \u001b[39m\u001b[32m2\u001b[39m test_greatest(\u001b[43mgreatest\u001b[49m)\n", + "\u001b[31mNameError\u001b[39m: name 'greatest' is not defined" + ] + } + ], + "source": [ + "# This will test your function \n", + "test_greatest(greatest)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 3. Write a function that sums all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [190, 131, 197, 180, 142, 107, 140, 123, 10, 99, 54, 23, 71, 67, 133, 73, 146, 18, 92, 158, 30, 199, 68, 22, 147, 29, 175, 185, 103, 46, 158, 70, 118, 157, 197, 156, 59, 114, 57, 2, 42, 38, 84, 19, 139, 31, 117, 48, 48, 170, 13, 25, 24, 160, 62, 156, 22, 84]\n", + "El numero mayor de la lista es: 199\n", + "La sumatoria de la lista es: 5528\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def sum_all(lst):\n", + " n = 0\n", + " for i in lst:\n", + " n = n + i\n", + " return n\n", + "import random as rm\n", + "def greatest(lst):\n", + " return max(lst) \n", + " \n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "mayor = greatest(lst)\n", + "resultado = sum_all(lst)\n", + "print(\"La lista contiene: \", lst)\n", + "print(\"El numero mayor de la lista es:\", mayor)\n", + "print(\"La sumatoria de la lista es:\", resultado)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_sum(sum_all)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 4. Write another function that multiplies all the elements on a list" + ] + }, + { + "cell_type": "code", + "execution_count": 36, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [65, 117, 89, 136, 30]\n", + "El numero mayor de la lista es: 136\n", + "los numeros multiplicados de la lista son: 2761527600\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def mult_all(lst): \n", + " n = 1 \n", + " for i in lst:\n", + " n = n * i\n", + " return n\n", + "import random as rm\n", + "def greatest(lst):\n", + " return max(lst) \n", + " \n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "mayor = greatest(lst)\n", + "resultado = mult_all(lst)\n", + "print(\"La lista contiene: \", lst)\n", + "print(\"El numero mayor de la lista es:\", mayor)\n", + "print(\"los numeros multiplicados de la lista son:\", resultado)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": { + "scrolled": true + }, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_mult(mult_all)" + ] + }, + { + "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": 46, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista contiene: [58, 179, 128]\n", + "los numeros resultado de la operacion + es:365\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def oper_all(arr, oper = \"*\"):\n", + " if oper == \"+\":\n", + " n = 0\n", + " for i in lst:\n", + " n = n + i\n", + " elif oper == \"*\": \n", + " n = 1 \n", + " for i in lst:\n", + " n = n * i\n", + " else:\n", + " raise ValueError(\"Operacion invalida use '+' o '*'\")\n", + " return n\n", + "b = int(input(\"Ingrese el intervalo para la lista: \"))\n", + "lst = [random.randint(1,200) for i in range(b)]\n", + "oper = input(\"Ingrese '+' para sumar o '*' para multiplicar: \")\n", + "resultado = oper_all(list, oper)\n", + "\n", + "print(\"La lista contiene: \", lst)\n", + "print(f\"los numeros resultado de la operacion {oper} es:{resultado}\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_operations(oper_all)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 6. Write a function that returns the factorial of a number." + ] + }, + { + "cell_type": "code", + "execution_count": 49, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "El factorial de 5 es: 120\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + " \n", + "def factorial(n):\n", + " if n < 0:\n", + " raise ValueError(\"El factorial no esta definido para numeros negativos\")\n", + " result = 1\n", + " for i in range (1, n+1):\n", + " result = result * i\n", + " return result\n", + "num = int(input(\"Ingrese el numero para calcular el factorial:\"))\n", + "print(f\"\\nEl factorial de {num} es:\", factorial(num))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "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": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_factorial(factorial)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 7. Write a function that takes a list and returns a list of the unique values.\n", + "\n", + "`NOTE: You cannot use set. 🤔`" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista original es: [5, 5, 5, 6, 7, ['alpha', 'betha', 'gamma'], 8, 9, 9, 9, 5, 1, 2, 100, ['alpha', 'betha', 'gamma'], 45, 8, 2, 9, 50, 41, 45]\n", + "La lista con valores unicos es: [5, 6, 7, ['alpha', 'betha', 'gamma'], 8, 9, 1, 2, 100, 45, 50, 41]\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def unique(lst_un):\n", + " unique_values = []\n", + " for i in lst_un:\n", + " if i not in unique_values:\n", + " unique_values.append(i)\n", + " return unique_values\n", + "\n", + "lst = [5,5,5,6,7,[\"alpha\",\"betha\",\"gamma\"],8,9,9,9,5,1,2,100,[\"alpha\",\"betha\",\"gamma\"],45,8,2,9,50,41,45]\n", + "\n", + "print(\"La lista original es:\", lst)\n", + "print(\"La lista con valores unicos es:\",unique(lst))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_unique(unique)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 8. Write a function that returns the mode of a list, i.e.: the element that appears the most times.\n", + "`NOTE: You should not use count... 🧐`" + ] + }, + { + "cell_type": "code", + "execution_count": 53, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "La lista es: [5, 3, 9, 5, 2, 5, 3, 3, 3, 7]\n", + "La moda de la lista es: 3\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def mode_counter(lst):\n", + " frecuencia = {}\n", + " for i in lst:\n", + " if i in frecuencia:\n", + " frecuencia[i] += 1\n", + " else: \n", + " frecuencia[i] = 1\n", + " max_frec = 0\n", + " moda_valor = None\n", + " for key, valor in frecuencia.items():\n", + " if valor > max_frec:\n", + " max_frec = valor\n", + " moda_valor = key\n", + " \n", + " return moda_valor\n", + "\n", + "mi_lista = [5, 3, 9, 5, 2, 5, 3, 3, 3, 7]\n", + "print(\"La lista es:\", mi_lista)\n", + "print(\"La moda de la lista es:\", mode_counter(mi_lista))\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# This will test your function \n", + "test_mode(mode_counter)" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## 9. Write a function that calculates the standard deviation of a list.\n", + "`NOTE: Do not use any libraries or already built functions. 😉`" + ] + }, + { + "cell_type": "code", + "execution_count": 54, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Lista: [2, 4, 4, 4, 5, 5, 7, 9]\n", + "Desviación estándar: 2.0\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def st_dev(list_sd):\n", + " n = len(list_sd)\n", + " if n == 0: \n", + " return 0 \n", + " mean = sum(list_sd)/n\n", + " sum_diff_sq = 0\n", + " for x in list_sd:\n", + " sum_diff_sq += (x - mean)**2\n", + " return (sum_diff_sq/n)**0.5\n", + "\n", + "lista = [2, 4, 4, 4, 5, 5, 7, 9]\n", + "print(\"Lista:\", lista)\n", + "print(\"Desviación estándar:\", st_dev(lista))" + ] + }, + { + "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": 58, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "'El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro' es pangrama?: True\n", + "\n", + "'A buen entendedor, pocas palabras bastan' es pangrama?: False\n", + "\n", + "'Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!' es pangrama?: True\n", + "\n", + "'El sol brilló intensamente todo el día' es pangrama?: False\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def pangram(string):\n", + " string = string.lower()\n", + " \n", + " alfabeto=\"abcdefghijklmnopqrstuvwxyz\"\n", + " \n", + " for letra in alfabeto:\n", + " if letra not in string:\n", + " return False\n", + " return True\n", + "ejemplo1 = \"El pingüino Wenceslao hizo kilómetros bajo exhaustiva lluvia y frío, añoraba a su querido cachorro\"\n", + "ejemplo2 = \"Jovencillo emponzoñado de whisky: ¡qué figurota exhibe!\" \n", + "ejemplo3 = \"A buen entendedor, pocas palabras bastan\"\n", + "ejemplo4 = \"El sol brilló intensamente todo el día\"\n", + "\n", + "print(f\"\\n'{ejemplo1}' es pangrama?:\", pangram(ejemplo1))\n", + "print(f\"\\n'{ejemplo3}' es pangrama?:\", pangram(ejemplo3))\n", + "print(f\"\\n'{ejemplo2}' es pangrama?:\", pangram(ejemplo2))\n", + "print(f\"\\n'{ejemplo4}' es pangrama?:\", pangram(ejemplo4))\n" + ] + }, + { + "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": 66, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Original: banana,apple,cherry,date,murcielago,zorrillo,racoon\n", + "Ordenado: apple,banana,cherry,date,murcielago,racoon,zorrillo\n" + ] + } + ], + "source": [ + "#your code here\n", + "\n", + "def sort_alpha(string):\n", + " palabras = []\n", + " palabra = \"\"\n", + " \n", + " for i in string:\n", + " if i == \",\":\n", + " palabras.append(palabra)\n", + " palabra =\"\"\n", + " else:\n", + " palabra = palabra + i\n", + " \n", + " palabras.append(palabra)\n", + " \n", + " palabras_ordenadas = sorted(palabras)\n", + " \n", + " result = \"\"\n", + " \n", + " for i, w in enumerate(palabras_ordenadas):\n", + " result = result + w\n", + " if i != len(palabras_ordenadas) - 1:\n", + " result = result + \",\" \n", + " return result \n", + "\n", + "ejemplo = \"banana,apple,cherry,date,murcielago,zorrillo,racoon\"\n", + "print(\"Original:\", ejemplo)\n", + "print(\"Ordenado:\", sort_alpha(ejemplo))\n", + " \n", + " " + ] + }, + { + "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": 68, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "True\n", + "False\n", + "False\n", + "False\n" + ] + } + ], + "source": [ + "\n", + "#your code here\n", + "def check_pass(password):\n", + " if len(password) < 8:\n", + " return False\n", + " minusculas = False\n", + " mayusculas = False\n", + " numeros = False\n", + " especiales = False\n", + "\n", + " digitos_especiales = \"!@#$%^&*()-_+=[]{}|:;,.<>?/`~\"\n", + " \n", + " for i in password:\n", + " if i.islower():\n", + " minusculas = True\n", + " elif i.isupper():\n", + " mayusculas = True\n", + " elif i.isdigit():\n", + " numeros = True\n", + " elif i in digitos_especiales:\n", + " especiales = True\n", + " return minusculas and mayusculas and numeros and especiales\n", + "\n", + "print(check_pass(\"Abc123!@\")) \n", + "print(check_pass(\"abcdefg\")) \n", + "print(check_pass(\"ABC12345\")) \n", + "print(check_pass(\"abcABC123\")) " + ] + }, + { + "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 +}