Skip to content

Commit 87bb050

Browse files
committed
Added unplanned activity from class today, fixed typo
1 parent 6afbea1 commit 87bb050

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

notebooks/L4/functions.ipynb

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,44 @@
137137
"cell_type": "markdown",
138138
"metadata": {},
139139
"source": [
140-
"### Funtions within a function (Yo dawg...)\n",
140+
"<hr>\n",
141+
"\n",
142+
"#### Check your understanding\n",
143+
"\n",
144+
"Let's see how things are going so far with functions. In the Python cell below, please:\n",
145+
"\n",
146+
"- Create a new function called `hello` with 2 parameters\n",
147+
" - Parameter 1 should be called `name` and you should assign some text to this parameter this when using the function\n",
148+
" - Parameter 2 should be called `age` and you should provide a number value for this parameter when using the function\n",
149+
"\n",
150+
"When using your function, the value that is returned should be a character string stating the `name` and `age` that were provided, which you can assign to a variable called `output`.\n",
151+
"Printing out `output` should produce something like the following:\n",
152+
"\n",
153+
"```python\n",
154+
"print(output)\n",
155+
"'Hello, my name is Dave. I am 38 years old.'\n",
156+
"```"
157+
]
158+
},
159+
{
160+
"cell_type": "code",
161+
"execution_count": null,
162+
"metadata": {},
163+
"outputs": [],
164+
"source": []
165+
},
166+
{
167+
"cell_type": "markdown",
168+
"metadata": {},
169+
"source": [
170+
"<hr>"
171+
]
172+
},
173+
{
174+
"cell_type": "markdown",
175+
"metadata": {},
176+
"source": [
177+
"### Functions within a function (Yo dawg...)\n",
141178
"\n",
142179
"What about converting Kelvins to Fahrenheit?\n",
143180
"We could write out a new formula for it, but we don’t need to.\n",

0 commit comments

Comments
 (0)