Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 51 additions & 11 deletions your-code/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
" \"\"\"\n",
" \n",
" # your code here\n",
" "
" x = lambda lst: lst"
]
},
{
Expand All @@ -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"
]
},
{
Expand All @@ -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)"
]
},
{
Expand All @@ -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": [
"<function division.<locals>.<lambda> at 0x0000028C415C80D0>\n"
]
}
],
"source": [
"z = division(2, 2)\n",
"print(z)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -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",
" "
]
},
{
Expand Down Expand Up @@ -206,7 +246,7 @@
"list1 = ['Green', 'cheese', 'English', 'tomato']\n",
"list2 = ['eggs', 'cheese', 'cucumber', 'tomato']\n",
"\n",
"# your code here"
"# your code here\n"
]
},
{
Expand Down Expand Up @@ -269,7 +309,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.2"
"version": "3.8.6"
}
},
"nbformat": 4,
Expand Down