Skip to content

Commit 47684d4

Browse files
committed
Add another exercise
1 parent 34f9206 commit 47684d4

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

notebooks/beginner/exercises/lists_exercise.ipynb

Lines changed: 45 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,48 @@
44
"cell_type": "markdown",
55
"metadata": {},
66
"source": [
7-
"# 1. Create a new list without modifiying the original one\n"
7+
"# 1. Fill the missing pieces\n",
8+
"Fill the `____` parts of the code below."
9+
]
10+
},
11+
{
12+
"cell_type": "code",
13+
"execution_count": null,
14+
"metadata": {},
15+
"outputs": [],
16+
"source": [
17+
"# Let's create an empty list\n",
18+
"my_list = ____\n",
19+
"\n",
20+
"# Let's add some values\n",
21+
"my_list.____('Python')\n",
22+
"my_list.____('is ok')\n",
23+
"my_list.____('sometimes')\n",
24+
"\n",
25+
"# Let's remove 'sometimes'\n",
26+
"my_list.____('sometimes')\n",
27+
"\n",
28+
"# Let's change the second item\n",
29+
"my_list[____] = 'is neat'"
30+
]
31+
},
32+
{
33+
"cell_type": "code",
34+
"execution_count": null,
35+
"metadata": {
36+
"editable": false
37+
},
38+
"outputs": [],
39+
"source": [
40+
"# Let's verify that it's correct\n",
41+
"assert my_list == ['Python', 'is neat']"
42+
]
43+
},
44+
{
45+
"cell_type": "markdown",
46+
"metadata": {},
47+
"source": [
48+
"# 2. Create a new list without modifiying the original one\n"
849
]
950
},
1051
{
@@ -25,7 +66,7 @@
2566
"outputs": [],
2667
"source": [
2768
"# Your implementation here\n",
28-
"modified = 'TODO'"
69+
"modified = "
2970
]
3071
},
3172
{
@@ -44,7 +85,7 @@
4485
"cell_type": "markdown",
4586
"metadata": {},
4687
"source": [
47-
"# 2. Create a merged sorted list"
88+
"# 3. Create a merged sorted list"
4889
]
4990
},
5091
{
@@ -67,7 +108,7 @@
67108
"outputs": [],
68109
"source": [
69110
"# Your implementation here\n",
70-
"my_list = 'TODO'"
111+
"my_list = "
71112
]
72113
},
73114
{

0 commit comments

Comments
 (0)