diff --git a/your-code/main.ipynb b/your-code/main.ipynb index 01257d4..f279083 100755 --- a/your-code/main.ipynb +++ b/your-code/main.ipynb @@ -32,7 +32,7 @@ " \"\"\"\n", " \n", " # your code here\n", - " " + " x = lambda lst: lst" ] }, { @@ -46,11 +46,12 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": {}, "outputs": [], "source": [ - "# your code here" + "# your code here\n", + "kelvin = lambda c: c + 273.15" ] }, { @@ -62,13 +63,23 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 5, "metadata": {}, - "outputs": [], + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "[285.15, 296.15, 311.15, 218.14999999999998, 297.15]\n" + ] + } + ], "source": [ "temps = [12, 23, 38, -55, 24]\n", "\n", - "# your code here" + "# your code here\n", + "conversion = list(map(kelvin, temps))\n", + "print(conversion)" ] }, { @@ -82,13 +93,41 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 62, "metadata": {}, "outputs": [], "source": [ - "# your code here" + "# your code here\n", + "def division(x, y): \n", + " mod = lambda x, y: True if x % y == 0 else False\n", + " return mod" + ] + }, + { + "cell_type": "code", + "execution_count": 65, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + ". at 0x0000028C415C80D0>\n" + ] + } + ], + "source": [ + "z = division(2, 2)\n", + "print(z)" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "markdown", "metadata": {}, @@ -111,7 +150,8 @@ " divisible by another number (to be passed later) and zero otherwise.\n", " \"\"\"\n", " \n", - " # your code here" + " # your code here\n", + " " ] }, { @@ -206,7 +246,7 @@ "list1 = ['Green', 'cheese', 'English', 'tomato']\n", "list2 = ['eggs', 'cheese', 'cucumber', 'tomato']\n", "\n", - "# your code here" + "# your code here\n" ] }, { @@ -269,7 +309,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.2" + "version": "3.8.6" } }, "nbformat": 4,