Skip to content

Commit bbcfa05

Browse files
committed
fix final typos
1 parent 0adac7a commit bbcfa05

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

11_functional_programming.ipynb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1327,10 +1327,10 @@
13271327
" Given a list of integers, write a function that only keeps the numbers that are multiples of a given constant <code>k</code>.\n",
13281328
" <ul>\n",
13291329
" <li>\n",
1330-
" <strong>Example 1</strong>: given <code>nums = [1, 2, 3, 4, 5]</code>, and <code>k = 2</code>, the result must be <code>[2, 4]</code>\n",
1330+
" <strong>Example 1</strong>: given <code>my_list = [1, 2, 3, 4, 5]</code>, and <code>k = 2</code>, the result must be <code>[2, 4]</code>\n",
13311331
" </li>\n",
13321332
" <li>\n",
1333-
" <strong>Example 2</strong>: given <code>nums = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]</code> and <code>k = 5</code>, the result is <code>[5, 10]</code>\n",
1333+
" <strong>Example 2</strong>: given <code>my_list = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]</code> and <code>k = 5</code>, the result is <code>[5, 10]</code>\n",
13341334
" </li>\n",
13351335
" </ul>\n",
13361336
"</div>\n",
@@ -1359,7 +1359,7 @@
13591359
"source": [
13601360
"%%ipytest\n",
13611361
"\n",
1362-
"def solution_multiples_of_n(my_list: \"list[int]\", k: int) -> \"list[int]\":\n",
1362+
"def solution_multiples_of_n(my_list: list[int], k: int) -> list[int]:\n",
13631363
" \"\"\"A function that keeps only the multiples of k from a given list.\n",
13641364
"\n",
13651365
" Args:\n",
@@ -1704,7 +1704,7 @@
17041704
"\n",
17051705
"def solution_exercise3(words: list[str]) -> list[(str, int)]:\n",
17061706
" \"\"\"A function that counts the number of words from a given list that start with each letter of the alphabet, using sorted() and itertools.groupby.\n",
1707-
" The function should be case insensitive, using lower() to ensure consistet capitalization.\n",
1707+
" The function should be case insensitive, using lower() to ensure consistent capitalization.\n",
17081708
" It should return a list of tuples, where each tuple contains a letter and the number of words that start with that letter.\n",
17091709
" The list of tuples should be sorted in alphabetical order.\n",
17101710
"\n",

0 commit comments

Comments
 (0)