8000 Updates to Functional programming (#92) · gaehlerm/python-tutorial@fbe6c25 · GitHub
[go: up one dir, main page]

Skip to content

Commit fbe6c25

Browse files
baffelliedoardob90yakutovicha
authored
Updates to Functional programming (empa-scientific-it#92)
Co-authored-by: Simone Baffelli <simone.baffelli@empa.ch> Co-authored-by: Edoardo Baldi <edoardob90@gmail.com> Co-authored-by: Aliaksandr Yakutovich <yakutovicha@gmail.com>
1 parent 7b55734 commit fbe6c25

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

functional_programming.ipynb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1259,7 +1259,7 @@
12591259
" Hints:\n",
12601260
" <ul>\n",
12611261
" <li>\n",
1262-
" The operator <code>%</code> (modulo) gives the remainder of division. <code>a % k</code> is 0 when a is a multiple of k. \n",
1262+
" The operator <code>%</code> (modulo) gives the remainder of division. <code>a % k</code> is 0 when <code>a</code> is a multiple of <code>k</code>. For more information, consult the chapter on basic datatypes. \n",
12631263
" </li>\n",
12641264
" <li>\n",
12651265
" Write your function in the cell below inside of the <code>solution_exercise1</code> function. The function receives a list <code>l</code> as an input and should return another list\n",
@@ -1400,7 +1400,7 @@
14001400
"source": [
14011401
"### Exercise 5: Counting initials 🌶️🌶️🌶️\n",
14021402
"\n",
1403-
"Given a list `w` of english words, write a function that counts how many words begin with each letter of the english alphabet and returns the result as a **alphabetically sorted** list of tuples `(letter, count)`. \n",
1403+
"Given a list `w` of English words, write a function that counts how many words begin with each letter of the English alphabet and returns the result as an **alphabetically sorted** list of tuples `(letter, count)`. We do not distinguish between uppercase and lowercase letters (\"A\" and \"a\" are considered the same). \n",
14041404
"\n",
14051405
"\n",
14061406
"<div class=\"alert alert-block alert-info\">\n",
@@ -1412,6 +1412,9 @@
14121412
" <li>\n",
14131413
" Write your function in the cell below inside of the <code>solution_exercise5</code> function. The function receives a list <code>w</code> as an input and should return another list\n",
14141414
" </li>\n",
1415+
" <li>\n",
1416+
" To ensure consistent capitalization you can use the <code>lower()</code> method of <code>str</code>\n",
1417+
" </li>\n",
14151418
" </ul>\n",
14161419
"<div>\n",
14171420
"\n"

0 commit comments

Comments
 (0)
0