Skip to content

Commit 58ad011

Browse files
committed
fixed week 5
1 parent 945e046 commit 58ad011

3 files changed

Lines changed: 247 additions & 144 deletions

File tree

‎Week_5_systems/.OTTER_LOG‎

58.2 KB
Binary file not shown.

‎Week_5_systems/Lab_5_ode_systems.ipynb‎

Lines changed: 225 additions & 91 deletions
Large diffs are not rendered by default.

Week_5_systems/lec_act_5_predator_prey.ipynb renamed to Week_5_systems/lec_act_5_predator_prey (1).ipynb

Lines changed: 22 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
<<<<<<< HEAD
6-
"execution_count": 2,
7-
=======
8-
"execution_count": 1,
9-
>>>>>>> 0c58d27a2b21bcdedb2b8400bc93f5ca628e9709
5+
"execution_count": 8,
106
"metadata": {
117
"deletable": false,
128
"editable": false
@@ -15,7 +11,7 @@
1511
"source": [
1612
"# Initialize Otter\n",
1713
"import otter\n",
18-
"grader = otter.Notebook(\"lec_act_5_predator_prey.ipynb\")"
14+
"grader = otter.Notebook(\"lec_act_5_predator_prey (1).ipynb\")"
1915
]
2016
},
2117
{
@@ -45,11 +41,7 @@
4541
},
4642
{
4743
"cell_type": "code",
48-
<<<<<<< HEAD
49-
"execution_count": 3,
50-
=======
51-
"execution_count": 2,
52-
>>>>>>> 0c58d27a2b21bcdedb2b8400bc93f5ca628e9709
44+
"execution_count": 9,
5345
"metadata": {},
5446
"outputs": [],
5547
"source": [
@@ -84,11 +76,7 @@
8476
},
8577
{
8678
"cell_type": "code",
87-
<<<<<<< HEAD
88-
"execution_count": 4,
89-
=======
90-
"execution_count": 3,
91-
>>>>>>> 0c58d27a2b21bcdedb2b8400bc93f5ca628e9709
79+
"execution_count": 10,
9280
"metadata": {
9381
"tags": [
9482
"otter_answer_cell"
@@ -109,33 +97,18 @@
10997
},
11098
{
11199
"cell_type": "code",
112-
<<<<<<< HEAD
113-
"execution_count": 5,
114-
=======
115-
"execution_count": 4,
116-
>>>>>>> 0c58d27a2b21bcdedb2b8400bc93f5ca628e9709
100+
"execution_count": 11,
117101
"metadata": {
118102
"tags": [
119103
"otter_answer_cell"
120104
]
121105
},
122106
"outputs": [
123107
{
124-
<<<<<<< HEAD
125-
"ename": "TypeError",
126-
"evalue": "compute_prey_from_prey_and_predator() got an unexpected keyword argument 'prey'",
127-
"output_type": "error",
128-
"traceback": [
129-
"\u001b[31m---------------------------------------------------------------------------\u001b[39m",
130-
"\u001b[31mTypeError\u001b[39m Traceback (most recent call last)",
131-
"\u001b[36mCell\u001b[39m\u001b[36m \u001b[39m\u001b[32mIn[5]\u001b[39m\u001b[32m, line 18\u001b[39m\n\u001b[32m 14\u001b[39m \n\u001b[32m 15\u001b[39m prey_initial = \u001b[32m100\u001b[39m\n\u001b[32m 16\u001b[39m predator_initial = \u001b[32m100\u001b[39m\n\u001b[32m 17\u001b[39m \n\u001b[32m---> \u001b[39m\u001b[32m18\u001b[39m prey_new = compute_prey_from_prey_and_predator(prey=prey_initial, predator=predator_initial, params=params)\n\u001b[32m 19\u001b[39m \n\u001b[32m 20\u001b[39m print(f\"Checking prey new {prey_new}, should be 90\")\n",
132-
"\u001b[31mTypeError\u001b[39m: compute_prey_from_prey_and_predator() got an unexpected keyword argument 'prey'"
133-
=======
134108
"name": "stdout",
135109
"output_type": "stream",
136110
"text": [
137111
"Checking prey new 90.0, should be 90\n"
138-
>>>>>>> 0c58d27a2b21bcdedb2b8400bc93f5ca628e9709
139112
]
140113
}
141114
],
@@ -164,7 +137,7 @@
164137
},
165138
{
166139
"cell_type": "code",
167-
"execution_count": 5,
140+
"execution_count": 12,
168141
"metadata": {
169142
"deletable": false,
170143
"editable": false
@@ -173,13 +146,13 @@
173146
{
174147
"data": {
175148
"text/html": [
176-
"<p><strong><pre style='display: inline;'>prey_from_prey_and_predator</pre></strong> passed! 🍀</p>"
149+
"<p><strong><pre style='display: inline;'>prey_from_prey_and_predator</pre></strong> passed! 🙌</p>"
177150
],
178151
"text/plain": [
179152
"prey_from_prey_and_predator results: All test cases passed!"
180153
]
181154
},
182-
"execution_count": 5,
155+
"execution_count": 12,
183156
"metadata": {},
184157
"output_type": "execute_result"
185158
}
@@ -218,7 +191,7 @@
218191
},
219192
{
220193
"cell_type": "code",
221-
"execution_count": 6,
194+
"execution_count": 13,
222195
"metadata": {
223196
"tags": [
224197
"otter_answer_cell"
@@ -239,7 +212,7 @@
239212
},
240213
{
241214
"cell_type": "code",
242-
"execution_count": 7,
215+
"execution_count": 14,
243216
"metadata": {
244217
"tags": [
245218
"otter_answer_cell"
@@ -263,7 +236,7 @@
263236
},
264237
{
265238
"cell_type": "code",
266-
"execution_count": 8,
239+
"execution_count": 15,
267240
"metadata": {
268241
"deletable": false,
269242
"editable": false
@@ -272,13 +245,13 @@
272245
{
273246
"data": {
274247
"text/html": [
275-
"<p><strong><pre style='display: inline;'>predator_from_prey_and_predator</pre></strong> passed! 🍀</p>"
248+
"<p><strong><pre style='display: inline;'>predator_from_prey_and_predator</pre></strong> passed! 🙌</p>"
276249
],
277250
"text/plain": [
278251
"predator_from_prey_and_predator results: All test cases passed!"
279252
]
280253
},
281-
"execution_count": 8,
254+
"execution_count": 15,
282255
"metadata": {},
283256
"output_type": "execute_result"
284257
}
@@ -315,7 +288,7 @@
315288
},
316289
{
317290
"cell_type": "code",
318-
"execution_count": 9,
291+
"execution_count": 16,
319292
"metadata": {
320293
"tags": [
321294
"otter_answer_cell"
@@ -337,7 +310,7 @@
337310
},
338311
{
339312
"cell_type": "code",
340-
"execution_count": 10,
313+
"execution_count": 17,
341314
"metadata": {
342315
"tags": [
343316
"otter_answer_cell"
@@ -361,7 +334,7 @@
361334
},
362335
{
363336
"cell_type": "code",
364-
"execution_count": 11,
337+
"execution_count": 18,
365338
"metadata": {
366339
"deletable": false,
367340
"editable": false
@@ -370,13 +343,13 @@
370343
{
371344
"data": {
372345
"text/html": [
373-
"<p><strong><pre style='display: inline;'>compute_one_time_step</pre></strong> passed! ✨</p>"
346+
"<p><strong><pre style='display: inline;'>compute_one_time_step</pre></strong> passed! 🍀</p>"
374347
],
375348
"text/plain": [
376349
"compute_one_time_step results: All test cases passed!"
377350
]
378351
},
379-
"execution_count": 11,
352+
"execution_count": 18,
380353
"metadata": {},
381354
"output_type": "execute_result"
382355
}
@@ -402,7 +375,7 @@
402375
},
403376
{
404377
"cell_type": "code",
405-
"execution_count": 14,
378+
"execution_count": 19,
406379
"metadata": {
407380
"tags": [
408381
"otter_answer_cell"
@@ -421,7 +394,7 @@
421394
},
422395
{
423396
"cell_type": "code",
424-
"execution_count": 15,
397+
"execution_count": 20,
425398
"metadata": {
426399
"deletable": false,
427400
"editable": false
@@ -430,13 +403,13 @@
430403
{
431404
"data": {
432405
"text/html": [
433-
"<p><strong><pre style='display: inline;'>hours_collaborators</pre></strong> passed! 🎉</p>"
406+
"<p><strong><pre style='display: inline;'>hours_collaborators</pre></strong> passed! 🍀</p>"
434407
],
435408
"text/plain": [
436409
"hours_collaborators results: All test cases passed!"
437410
]
438411
},
439-
"execution_count": 15,
412+
"execution_count": 20,
440413
"metadata": {},
441414
"output_type": "execute_result"
442415
}
@@ -464,11 +437,7 @@
464437
],
465438
"metadata": {
466439
"kernelspec": {
467-
<<<<<<< HEAD
468440
"display_name": "intropythonprogramming (3.12.7)",
469-
=======
470-
"display_name": "intropythonprogramming",
471-
>>>>>>> 0c58d27a2b21bcdedb2b8400bc93f5ca628e9709
472441
"language": "python",
473442
"name": "python3"
474443
},

0 commit comments

Comments
 (0)