Skip to content

Commit

Permalink
Update Task 7 in cheatsheet.ipynb
Browse files Browse the repository at this point in the history
  • Loading branch information
kostrykin committed Sep 8, 2024
1 parent 2fe52b7 commit 4926a01
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cheatsheet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Afterwards, use the function `truncate_list` defined above to obtain the list `A` truncated after 3 elements, and print the *sum* and the *product* of the elements in the truncated list:"
"Afterwards, use the function `truncate_list` defined above to obtain the list `A` truncated after 3 elements. We call that truncated list `A3`. Print the *sum* and the *product* of the elements in the truncated list:"
]
},
{
Expand All @@ -260,6 +260,13 @@
"A3 = truncate_list(A, 3)\n",
"..."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The correct result for `A3` is `[1, 2, 3]` and 6 is both the sum and product of the elements."
]
}
],
"metadata": {
Expand Down

0 comments on commit 4926a01

Please sign in to comment.