Skip to content

Commit 970c05d

Browse files
small changes
1 parent 40cd183 commit 970c05d

File tree

1 file changed

+54
-5
lines changed

1 file changed

+54
-5
lines changed

Intro_To_Python.ipynb

Lines changed: 54 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,28 @@
143143
"source": "Now, write an if statement that checks if 3 + 9 is greater than 7, and if so, print out something. Afterwards, print out another equation. Make sure to indent it correctly!",
144144
"id": "d89d2f8bff2057b3"
145145
},
146+
{
147+
"metadata": {},
148+
"cell_type": "code",
149+
"outputs": [],
150+
"execution_count": null,
151+
"source": "# write here",
152+
"id": "82ca1d1ad2afe1a7"
153+
},
154+
{
155+
"metadata": {},
156+
"cell_type": "markdown",
157+
"source": "Write another if statement that checks if 3 * 8 is greater than 2 + 16 and if it is, print out the two results.",
158+
"id": "c12322df0c213a1d"
159+
},
160+
{
161+
"metadata": {},
162+
"cell_type": "code",
163+
"outputs": [],
164+
"execution_count": null,
165+
"source": "# practice here",
166+
"id": "628ae4fa255db811"
167+
},
146168
{
147169
"metadata": {},
148170
"cell_type": "markdown",
@@ -167,6 +189,23 @@
167189
],
168190
"id": "2d86bb363be72685"
169191
},
192+
{
193+
"metadata": {},
194+
"cell_type": "markdown",
195+
"source": "try calling this function below!",
196+
"id": "4e6e90af32d25617"
197+
},
198+
{
199+
"metadata": {},
200+
"cell_type": "code",
201+
"outputs": [],
202+
"execution_count": null,
203+
"source": [
204+
"def multiply_fourfold(text):\n",
205+
" print(text + text + text + text)\n"
206+
],
207+
"id": "2dd3422fe3853b3f"
208+
},
170209
{
171210
"metadata": {},
172211
"cell_type": "markdown",
@@ -180,8 +219,8 @@
180219
{
181220
"metadata": {
182221
"ExecuteTime": {
183-
"end_time": "2025-08-12T15:10:22.174124Z",
184-
"start_time": "2025-08-12T15:10:22.153190Z"
222+
"end_time": "2025-09-19T16:17:06.845303Z",
223+
"start_time": "2025-09-19T16:17:06.612175Z"
185224
}
186225
},
187226
"cell_type": "code",
@@ -197,12 +236,22 @@
197236
"name": "stdout",
198237
"output_type": "stream",
199238
"text": [
200-
"5\n",
201-
"I love 3.1415962\n"
239+
"5\n"
240+
]
241+
},
242+
{
243+
"ename": "TypeError",
244+
"evalue": "can only concatenate str (not \"float\") to str",
245+
"output_type": "error",
246+
"traceback": [
247+
"\u001B[31m---------------------------------------------------------------------------\u001B[39m",
248+
"\u001B[31mTypeError\u001B[39m Traceback (most recent call last)",
249+
"\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[1]\u001B[39m\u001B[32m, line 4\u001B[39m\n\u001B[32m 2\u001B[39m \u001B[38;5;28mprint\u001B[39m(x)\n\u001B[32m 3\u001B[39m pi = \u001B[32m3.1415962\u001B[39m\n\u001B[32m----> \u001B[39m\u001B[32m4\u001B[39m \u001B[38;5;28mprint\u001B[39m(\u001B[33;43m\"\u001B[39;49m\u001B[33;43mI love \u001B[39;49m\u001B[33;43m\"\u001B[39;49m\u001B[43m \u001B[49m\u001B[43m+\u001B[49m\u001B[43m \u001B[49m\u001B[43mpi\u001B[49m)\n",
250+
"\u001B[31mTypeError\u001B[39m: can only concatenate str (not \"float\") to str"
202251
]
203252
}
204253
],
205-
"execution_count": 2
254+
"execution_count": 1
206255
},
207256
{
208257
"metadata": {},

0 commit comments

Comments
 (0)