Skip to content

Commit

Permalink
update exercise day 05
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Aug 2, 2024
1 parent 9b922fb commit 7f55e62
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions exercises/day-01e/python-fundamentals-IV.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
" - Know how to find and write your own function documentation \n",
" - Know why we use functions \n",
" - Understand scoping rules and blocks \n",
" - Be able to define and use functions with multiple return values\n",
" - Understand function arguments with default values\n",
" - Know how to set function argument values by position or name\n",
"3. Applications: Economic Production Functions \n",
Expand Down Expand Up @@ -104,7 +103,7 @@
"id": "89fd61a9-399c-4c67-968d-3ba33f80252a",
"metadata": {},
"source": [
"**Exercise 1:**\n",
"**Exercise 1:** Calculating Net Present Value\n",
"\n",
"Companies often invest in training their employees to raise their productivity. Economists sometimes wonder why companies spend this money when this incentivizes other companies to hire their employees away with higher salaries since employees gain human capital from training?\n",
"\n",
Expand Down Expand Up @@ -252,7 +251,7 @@
" # step 1\n",
" # step 2\n",
" # ...\n",
" return outputs\n",
" return output(s)\n",
"```\n",
"\n",
"```{tip}\n",
Expand Down Expand Up @@ -333,7 +332,7 @@
"id": "ec551aea-8c56-4b10-850f-355d9e4ed7eb",
"metadata": {},
"source": [
"As you can see, in python you can write code that works (in many cases) on multipled data types, so long as they behave in the same way.\n",
"As you can see, in python you can write code that works (in many cases) on different data types, so long as they behave in the same way.\n",
"\n",
"In this case a `list` and an `array` are both array / list-like objects that contain a collection of values"
]
Expand Down Expand Up @@ -559,7 +558,7 @@
"\n",
"### An Example Production Function\n",
"\n",
"Throughout this lecture, we will use the\n",
"Throughout this exercise notebook, we will use the\n",
"[Cobb-Douglas](https://en.wikipedia.org/wiki/Cobb%E2%80%93Douglas_production_function)\n",
"production function to help us understand how to create Python\n",
"functions and why they are useful.\n",
Expand Down Expand Up @@ -700,7 +699,7 @@
"id": "b3cd443d-8021-4fc4-a7f9-841983fb85d7",
"metadata": {},
"source": [
"**Exercise 10:** Redo *exercise 9* and save the results in a dictionary of tuples that pairs the input combinations of k and l with the evaluated output of the `cobb_douglas` function such as\n",
"**Exercise 10:** Redo *exercise 9* and save the results in a dictionary that pairs the input combinations of k and l (as a tuple) with the evaluated output of the `cobb_douglas` function such as\n",
"\n",
"```python\n",
"result = {\n",
Expand Down Expand Up @@ -822,7 +821,7 @@
"id": "00868c36-0a41-48ac-aaae-c97610e79f63",
"metadata": {},
"source": [
"but now we have the option of changing `alpha` and `z` from their default values"
"but now we have the option of changing `alpha` and/or `z` from their default values"
]
},
{
Expand Down Expand Up @@ -851,6 +850,14 @@
"outputs": [],
"source": []
},
{
"cell_type": "markdown",
"id": "eb2df90d-e6d5-450b-8318-a82c62d82362",
"metadata": {},
"source": [
"**Exercise 13:** Use the plot code from *exercise 11* and see how changes in the parameter `z` changes the shape of the cobb_douglas function."
]
},
{
"cell_type": "markdown",
"id": "72e2ab40-a33c-4701-bb75-c648b29c9b4b",
Expand Down

0 comments on commit 7f55e62

Please sign in to comment.