diff --git a/s24/.gitignore b/s24/.gitignore new file mode 100644 index 0000000000000000000000000000000000000000..50f6c9067d520658fc9d5b82dedf3b4043f1714d --- /dev/null +++ b/s24/.gitignore @@ -0,0 +1,2 @@ +**/.ipynb_checkpoints/** +**/__pycache__/** \ No newline at end of file diff --git a/s24/.gitkeep b/s24/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/s24/Common/01_Introduction/01_Introduction.pdf b/s24/Common/01_Introduction/01_Introduction.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fb6c96d4500c74992ad5ab9607b981b7cdf12c4d Binary files /dev/null and b/s24/Common/01_Introduction/01_Introduction.pdf differ diff --git a/s24/Common/01_Introduction/01_Introduction.ppt b/s24/Common/01_Introduction/01_Introduction.ppt new file mode 100644 index 0000000000000000000000000000000000000000..2489e84e3e3fbce47fb92e068951f2e3c9ff5d53 Binary files /dev/null and b/s24/Common/01_Introduction/01_Introduction.ppt differ diff --git a/s24/Common/02_Pseudocode/lec-02-worksheet-solution.pdf b/s24/Common/02_Pseudocode/lec-02-worksheet-solution.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6a5decd2b74dacc10ad7d549c7dc63f1de1ccc21 Binary files /dev/null and b/s24/Common/02_Pseudocode/lec-02-worksheet-solution.pdf differ diff --git a/s24/Common/02_Pseudocode/lec-02-worksheet.docx b/s24/Common/02_Pseudocode/lec-02-worksheet.docx new file mode 100644 index 0000000000000000000000000000000000000000..407d4a4bb246245e5bac42aa85b1d9876c47a35f Binary files /dev/null and b/s24/Common/02_Pseudocode/lec-02-worksheet.docx differ diff --git a/s24/Common/02_Pseudocode/lec-02-worksheet.pdf b/s24/Common/02_Pseudocode/lec-02-worksheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0a8b99576eadee5158e6f8b370358983c856b737 Binary files /dev/null and b/s24/Common/02_Pseudocode/lec-02-worksheet.pdf differ diff --git a/s24/Common/03_Operators/03_Operators.pdf b/s24/Common/03_Operators/03_Operators.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e692d21ba5d1c17cd017ea7ecf25dab8b5a680a5 Binary files /dev/null and b/s24/Common/03_Operators/03_Operators.pdf differ diff --git a/s24/Common/03_Operators/03_Operators.ppt b/s24/Common/03_Operators/03_Operators.ppt new file mode 100644 index 0000000000000000000000000000000000000000..018ce5687ecac902173df21c64958a80965bc279 Binary files /dev/null and b/s24/Common/03_Operators/03_Operators.ppt differ diff --git a/s24/Common/03_Operators/lec-03-worksheet-solution.pdf b/s24/Common/03_Operators/lec-03-worksheet-solution.pdf new file mode 100644 index 0000000000000000000000000000000000000000..dfd45bcc92ef1253fd566e462b278320f9aabe23 Binary files /dev/null and b/s24/Common/03_Operators/lec-03-worksheet-solution.pdf differ diff --git a/s24/Common/03_Operators/lec-03-worksheet.docx b/s24/Common/03_Operators/lec-03-worksheet.docx new file mode 100644 index 0000000000000000000000000000000000000000..3ec3e507a33f9f02d980e65d314b3f4092e5581f Binary files /dev/null and b/s24/Common/03_Operators/lec-03-worksheet.docx differ diff --git a/s24/Common/03_Operators/lec-03-worksheet.pdf b/s24/Common/03_Operators/lec-03-worksheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ff4e5c56df8df73beed79e2126b60bcf5cfbb912 Binary files /dev/null and b/s24/Common/03_Operators/lec-03-worksheet.pdf differ diff --git a/s24/Common/04_Vars_and_Exprs/04_Vars_and_Exprs.pdf b/s24/Common/04_Vars_and_Exprs/04_Vars_and_Exprs.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c6cc8d4f01e4017b0492f4b0f19abe3d816b471a Binary files /dev/null and b/s24/Common/04_Vars_and_Exprs/04_Vars_and_Exprs.pdf differ diff --git a/s24/Common/04_Vars_and_Exprs/04_Vars_and_Exprs.ppt b/s24/Common/04_Vars_and_Exprs/04_Vars_and_Exprs.ppt new file mode 100644 index 0000000000000000000000000000000000000000..7c454174cb35c05e19217dc69349f720698ffea1 Binary files /dev/null and b/s24/Common/04_Vars_and_Exprs/04_Vars_and_Exprs.ppt differ diff --git a/s24/Common/05_Using_Functions/05_Using_Functions.pdf b/s24/Common/05_Using_Functions/05_Using_Functions.pdf new file mode 100644 index 0000000000000000000000000000000000000000..06396e5c2a059394b3e754730fd3e55110f57fd9 Binary files /dev/null and b/s24/Common/05_Using_Functions/05_Using_Functions.pdf differ diff --git a/s24/Common/05_Using_Functions/05_Using_Functions.ppt b/s24/Common/05_Using_Functions/05_Using_Functions.ppt new file mode 100644 index 0000000000000000000000000000000000000000..f0bd5c54494f6042c850f7b1e072521ba5ef4d86 Binary files /dev/null and b/s24/Common/05_Using_Functions/05_Using_Functions.ppt differ diff --git a/s24/Common/06_Creating_Functions/06_Creating_Functions.pdf b/s24/Common/06_Creating_Functions/06_Creating_Functions.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eda74ca2dafb2e6441616fe6c5ebd85fa7f990e6 Binary files /dev/null and b/s24/Common/06_Creating_Functions/06_Creating_Functions.pdf differ diff --git a/s24/Common/06_Creating_Functions/06_Creating_Functions.ppt b/s24/Common/06_Creating_Functions/06_Creating_Functions.ppt new file mode 100644 index 0000000000000000000000000000000000000000..6e7fbf9dea72c9062ab2ef8ae8b1f76ee8298761 Binary files /dev/null and b/s24/Common/06_Creating_Functions/06_Creating_Functions.ppt differ diff --git a/s24/Common/06_Creating_Functions/lec-06-worksheet-solution.pdf b/s24/Common/06_Creating_Functions/lec-06-worksheet-solution.pdf new file mode 100644 index 0000000000000000000000000000000000000000..29a883754dd82916d9102d0fef14bbe5b2809698 Binary files /dev/null and b/s24/Common/06_Creating_Functions/lec-06-worksheet-solution.pdf differ diff --git a/s24/Common/06_Creating_Functions/lec-06-worksheet.docx b/s24/Common/06_Creating_Functions/lec-06-worksheet.docx new file mode 100644 index 0000000000000000000000000000000000000000..24a9d793ebfccc8718085adf1e3eb1479a9f60af Binary files /dev/null and b/s24/Common/06_Creating_Functions/lec-06-worksheet.docx differ diff --git a/s24/Common/06_Creating_Functions/lec-06-worksheet.pdf b/s24/Common/06_Creating_Functions/lec-06-worksheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..fc3b5792b2b1c57aa2f1985e86d2130f9e764d21 Binary files /dev/null and b/s24/Common/06_Creating_Functions/lec-06-worksheet.pdf differ diff --git a/s24/Common/06_Creating_Functions/lec-06.html b/s24/Common/06_Creating_Functions/lec-06.html new file mode 100644 index 0000000000000000000000000000000000000000..193f615a3588fff070eb0bd9174865e6b00a9ee3 --- /dev/null +++ b/s24/Common/06_Creating_Functions/lec-06.html @@ -0,0 +1,62 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> + +<!-- + Python Tutor: https://github.com/pgbovine/OnlinePythonTutor/ + Copyright (C) Philip Guo (philip@pgbovine.net) + LICENSE: https://github.com/pgbovine/OnlinePythonTutor/blob/master/LICENSE.txt +--> + +<head> + <title>CS 220 - Function Scope</title> + + <script type="text/javascript" src="../js/pytutor-embed.bundle.js" charset="utf-8"></script> + +</head> + +<body style="background-color: white;"> + +<!-- +To auto-generate examples: + +python pytutor.py lec-08/practice1.py lec-08/practice2.py lec-08/practice3.py lec-08/lesson1.py lec-08/lesson2.py lec-08/lesson3.py lec-08/lesson4.py lec-08/lesson5.py lec-08/lesson6.py lec-08/lesson7.py lec-08/lesson8.py lec-08/lesson9.py lec-08/lesson10.py +--> + +<h1>CS 220 - Tracing Functions</h1> + +<h2>Worksheet Problem 19</h2> + +<div id="lec-06_w19_py"></div> +<script type="text/javascript"> + var trace = {"code": "print(\"A\")\n\ndef foo():\n print(\"B\")\nprint(\"C\")\nfoo()\nprint(\"D\")\nfoo()\n", "trace": [{"ordered_globals": [], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {}, "heap": {}, "line": 1, "event": "step_line"}, {"ordered_globals": [], "stdout": "A\n", "func_name": "<module>", "stack_to_render": [], "globals": {}, "heap": {}, "line": 3, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 5, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nC\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 6, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nC\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 3, "event": "call"}, {"ordered_globals": ["foo"], "stdout": "A\nC\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 4, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": ["__return__"]}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 4, "event": "return"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 7, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\nD\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 8, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\nD\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 3, "event": "call"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\nD\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 4, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\nD\nB\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": ["__return__"]}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 4, "event": "return"}, {"ordered_globals": ["foo"], "stdout": "A\nC\nB\nD\nB\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 8, "event": "return"}]}; + addVisualizerToPage(trace, 'lec-06_w19_py', {startingInstruction: 0, hideCode: false, lang: "py3", disableHeapNesting: true}); +</script> + + +<h2>Worksheet Problem 20</h2> +<div id="lec-06_w20_py"></div> +<script type="text/javascript"> + var trace = {"code": "print(\"A\")\n\ndef foo():\n print(\"B\")\n print(\"C\")\nfoo()\nprint(\"D\")\nfoo()\n", "trace": [{"ordered_globals": [], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {}, "heap": {}, "line": 1, "event": "step_line"}, {"ordered_globals": [], "stdout": "A\n", "func_name": "<module>", "stack_to_render": [], "globals": {}, "heap": {}, "line": 3, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 6, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 3, "event": "call"}, {"ordered_globals": ["foo"], "stdout": "A\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 4, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nB\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 5, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\n", "func_name": "foo", "stack_to_render": [{"frame_id": 1, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f1", "ordered_varnames": ["__return__"]}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 5, "event": "return"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 7, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\nD\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 8, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\nD\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 3, "event": "call"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\nD\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 4, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\nD\nB\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": []}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 5, "event": "step_line"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\nD\nB\nC\n", "func_name": "foo", "stack_to_render": [{"frame_id": 2, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "foo", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "foo_f2", "ordered_varnames": ["__return__"]}], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 5, "event": "return"}, {"ordered_globals": ["foo"], "stdout": "A\nB\nC\nD\nB\nC\n", "func_name": "<module>", "stack_to_render": [], "globals": {"foo": ["REF", 1]}, "heap": {"1": ["FUNCTION", "foo()", null]}, "line": 8, "event": "return"}]}; + addVisualizerToPage(trace, 'lec-06_w20_py', {startingInstruction: 0, hideCode: false, lang: "py3", disableHeapNesting: true}); +</script> + +<h2>Worksheet Problem 21</h2> +<div id="lec-06_w21_py"></div> +<script type="text/javascript"> + var trace = {"code": "def func_c():\n print(\"C\")\n\ndef func_b():\n print(\"B1\")\n func_c()\n print(\"B2\")\n\ndef func_a():\n print(\"A1\")\n func_b()\n print(\"A2\")\n\nfunc_a()\n", "trace": [{"ordered_globals": [], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {}, "heap": {}, "line": 1, "event": "step_line"}, {"ordered_globals": ["func_c"], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {"func_c": ["REF", 1]}, "heap": {"1": ["FUNCTION", "func_c()", null]}, "line": 4, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b"], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {"func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null]}, "line": 9, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 14, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "", "func_name": "func_a", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 9, "event": "call"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "", "func_name": "func_a", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 10, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\n", "func_name": "func_a", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 11, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\n", "func_name": "func_b", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 4, "event": "call"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\n", "func_name": "func_b", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 5, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\n", "func_name": "func_b", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 6, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\n", "func_name": "func_c", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}, {"frame_id": 3, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_c", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_c_f3", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 1, "event": "call"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\n", "func_name": "func_c", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}, {"frame_id": 3, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_c", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_c_f3", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 2, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\nC\n", "func_name": "func_c", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}, {"frame_id": 3, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "func_c", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_c_f3", "ordered_varnames": ["__return__"]}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 2, "event": "return"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\nC\n", "func_name": "func_b", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 7, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\nC\nB2\n", "func_name": "func_b", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": false, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}, {"frame_id": 2, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "func_b", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_b_f2", "ordered_varnames": ["__return__"]}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 7, "event": "return"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\nC\nB2\n", "func_name": "func_a", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": []}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 12, "event": "step_line"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\nC\nB2\nA2\n", "func_name": "func_a", "stack_to_render": [{"frame_id": 1, "encoded_locals": {"__return__": null}, "is_highlighted": true, "is_parent": false, "func_name": "func_a", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "func_a_f1", "ordered_varnames": ["__return__"]}], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 12, "event": "return"}, {"ordered_globals": ["func_c", "func_b", "func_a"], "stdout": "A1\nB1\nC\nB2\nA2\n", "func_name": "<module>", "stack_to_render": [], "globals": {"func_a": ["REF", 3], "func_c": ["REF", 1], "func_b": ["REF", 2]}, "heap": {"1": ["FUNCTION", "func_c()", null], "2": ["FUNCTION", "func_b()", null], "3": ["FUNCTION", "func_a()", null]}, "line": 14, "event": "return"}]}; + addVisualizerToPage(trace, 'lec-06_w21_py', {startingInstruction: 0, hideCode: false, lang: "py3", disableHeapNesting: true}); +</script> + +<h2>Worksheet Problem 22</h2> +<div id="lec-06_w22_py"></div> +<script type="text/javascript"> + var trace = {"code": "def f():\n print(\"A\")\n return(\"B\")\n print(\"C\")\nprint(\"D\")\nx = f()\nprint(\"E\")\nprint(x)\n", "trace": [{"ordered_globals": [], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {}, "heap": {}, "line": 1, "event": "step_line"}, {"ordered_globals": ["f"], "stdout": "", "func_name": "<module>", "stack_to_render": [], "globals": {"f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 5, "event": "step_line"}, {"ordered_globals": ["f"], "stdout": "D\n", "func_name": "<module>", "stack_to_render": [], "globals": {"f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 6, "event": "step_line"}, {"ordered_globals": ["f"], "stdout": "D\n", "func_name": "f", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "f", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "f_f1", "ordered_varnames": []}], "globals": {"f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 1, "event": "call"}, {"ordered_globals": ["f"], "stdout": "D\n", "func_name": "f", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "f", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "f_f1", "ordered_varnames": []}], "globals": {"f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 2, "event": "step_line"}, {"ordered_globals": ["f"], "stdout": "D\nA\n", "func_name": "f", "stack_to_render": [{"frame_id": 1, "encoded_locals": {}, "is_highlighted": true, "is_parent": false, "func_name": "f", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "f_f1", "ordered_varnames": []}], "globals": {"f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 3, "event": "step_line"}, {"ordered_globals": ["f"], "stdout": "D\nA\n", "func_name": "f", "stack_to_render": [{"frame_id": 1, "encoded_locals": {"__return__": "B"}, "is_highlighted": true, "is_parent": false, "func_name": "f", "is_zombie": false, "parent_frame_id_list": [], "unique_hash": "f_f1", "ordered_varnames": ["__return__"]}], "globals": {"f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 3, "event": "return"}, {"ordered_globals": ["f", "x"], "stdout": "D\nA\n", "func_name": "<module>", "stack_to_render": [], "globals": {"x": "B", "f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 7, "event": "step_line"}, {"ordered_globals": ["f", "x"], "stdout": "D\nA\nE\n", "func_name": "<module>", "stack_to_render": [], "globals": {"x": "B", "f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 8, "event": "step_line"}, {"ordered_globals": ["f", "x"], "stdout": "D\nA\nE\nB\n", "func_name": "<module>", "stack_to_render": [], "globals": {"x": "B", "f": ["REF", 1]}, "heap": {"1": ["FUNCTION", "f()", null]}, "line": 8, "event": "return"}]}; + addVisualizerToPage(trace, 'lec-06_w22_py', {startingInstruction: 0, hideCode: false, lang: "py3", disableHeapNesting: true}); +</script> + + + + + +</body> +</html> diff --git a/s24/Common/06_Creating_Functions/lec-06/w19.py b/s24/Common/06_Creating_Functions/lec-06/w19.py new file mode 100644 index 0000000000000000000000000000000000000000..c6032e79c70a88995fcaeaa6182ba0ca457156d9 --- /dev/null +++ b/s24/Common/06_Creating_Functions/lec-06/w19.py @@ -0,0 +1,8 @@ +print("A") + +def foo(): + print("B") +print("C") +foo() +print("D") +foo() diff --git a/s24/Common/06_Creating_Functions/lec-06/w20.py b/s24/Common/06_Creating_Functions/lec-06/w20.py new file mode 100644 index 0000000000000000000000000000000000000000..f14c9115370d4d7f5e9d49bd4866ed1c5003d66e --- /dev/null +++ b/s24/Common/06_Creating_Functions/lec-06/w20.py @@ -0,0 +1,8 @@ +print("A") + +def foo(): + print("B") + print("C") +foo() +print("D") +foo() diff --git a/s24/Common/06_Creating_Functions/lec-06/w21.py b/s24/Common/06_Creating_Functions/lec-06/w21.py new file mode 100644 index 0000000000000000000000000000000000000000..57a3bbc33dd312b89b23b963f4ec431016c5661a --- /dev/null +++ b/s24/Common/06_Creating_Functions/lec-06/w21.py @@ -0,0 +1,14 @@ +def func_c(): + print("C") + +def func_b(): + print("B1") + func_c() + print("B2") + +def func_a(): + print("A1") + func_b() + print("A2") + +func_a() diff --git a/s24/Common/06_Creating_Functions/lec-06/w22.py b/s24/Common/06_Creating_Functions/lec-06/w22.py new file mode 100644 index 0000000000000000000000000000000000000000..d7474ac7a5d8a66129088d979ec9068cec97be24 --- /dev/null +++ b/s24/Common/06_Creating_Functions/lec-06/w22.py @@ -0,0 +1,8 @@ +def f(): + print("A") + return("B") + print("C") +print("D") +x = f() +print("E") +print(x) diff --git a/s24/Common/06_Creating_Functions/pytutor.py b/s24/Common/06_Creating_Functions/pytutor.py new file mode 100644 index 0000000000000000000000000000000000000000..2ee8f2497cfc7294916dd1c699379eea36455168 --- /dev/null +++ b/s24/Common/06_Creating_Functions/pytutor.py @@ -0,0 +1,34 @@ +import os, sys, json, subprocess +from subprocess import check_output + +PYTUTOR = "/Users/trh/g/OnlinePythonTutor/v5-unity/generate_json_trace.py" + +EMBEDDING = """ +<div id="DIV"></div> +<script type="text/javascript"> + var trace = TRACE; + addVisualizerToPage(trace, 'DIV', {startingInstruction: 0, hideCode: false, lang: "py3", disableHeapNesting: true}); +</script> +""" + +def run_pytutor(py): + try: + js = check_output(["python", PYTUTOR, py]) + except subprocess.CalledProcessError as e: + js = e.output + return json.dumps(json.loads(js)) + +def main(): + if len(sys.argv) < 2: + print("Usage: python pytutor.py file1.py [file2.py, ...]") + sys.exit(1) + + for py in sys.argv[1:]: + js = run_pytutor(py) + div = py.replace(".", "_").replace("/", "_") + code = EMBEDDING.replace("DIV", div).replace("TRACE", js) + print(code) + + +if __name__ == '__main__': + main() diff --git a/s24/Common/07_Function_Scope/07_Function_Scope.pdf b/s24/Common/07_Function_Scope/07_Function_Scope.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6a80515321dae9ea8300dddcce5e4cf183d20b98 Binary files /dev/null and b/s24/Common/07_Function_Scope/07_Function_Scope.pdf differ diff --git a/s24/Common/07_Function_Scope/07_Function_Scope.ppt b/s24/Common/07_Function_Scope/07_Function_Scope.ppt new file mode 100644 index 0000000000000000000000000000000000000000..0022a654d34f212c868aa80d27c43c91f65f884c Binary files /dev/null and b/s24/Common/07_Function_Scope/07_Function_Scope.ppt differ diff --git a/s24/Common/08_Conditionals-1/08_Conditionals-1.pdf b/s24/Common/08_Conditionals-1/08_Conditionals-1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..45cbc8eb2271c69bb832addd84c3e327a9da2626 Binary files /dev/null and b/s24/Common/08_Conditionals-1/08_Conditionals-1.pdf differ diff --git a/s24/Common/08_Conditionals-1/08_Conditionals-1.ppt b/s24/Common/08_Conditionals-1/08_Conditionals-1.ppt new file mode 100644 index 0000000000000000000000000000000000000000..5cdc3fb08de322c82d0a613cf56b69e18cc5278f Binary files /dev/null and b/s24/Common/08_Conditionals-1/08_Conditionals-1.ppt differ diff --git a/s24/Common/08_Conditionals-1/lec-08-worksheet.docx b/s24/Common/08_Conditionals-1/lec-08-worksheet.docx new file mode 100644 index 0000000000000000000000000000000000000000..4f7f5d34293c33b69000f701d32dc3f4328b5922 Binary files /dev/null and b/s24/Common/08_Conditionals-1/lec-08-worksheet.docx differ diff --git a/s24/Common/08_Conditionals-1/lec-08-worksheet.pdf b/s24/Common/08_Conditionals-1/lec-08-worksheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..43638ed1d773f111384cfa3adef3f6d83d480076 Binary files /dev/null and b/s24/Common/08_Conditionals-1/lec-08-worksheet.pdf differ diff --git a/s24/Common/09_Conditionals-2/09_Conditionals-2.pdf b/s24/Common/09_Conditionals-2/09_Conditionals-2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9b7969333e92f7e37287c23232d21d183516083f Binary files /dev/null and b/s24/Common/09_Conditionals-2/09_Conditionals-2.pdf differ diff --git a/s24/Common/09_Conditionals-2/09_Conditionals-2.ppt b/s24/Common/09_Conditionals-2/09_Conditionals-2.ppt new file mode 100644 index 0000000000000000000000000000000000000000..67563e0ea16a5ffb59579f2f94eb122cbb8488b6 Binary files /dev/null and b/s24/Common/09_Conditionals-2/09_Conditionals-2.ppt differ diff --git a/s24/Common/10_Iteration-1/10_Iteration-1.pdf b/s24/Common/10_Iteration-1/10_Iteration-1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c73be41720a03196128ec2ec35dbd5cbe9114406 Binary files /dev/null and b/s24/Common/10_Iteration-1/10_Iteration-1.pdf differ diff --git a/s24/Common/10_Iteration-1/10_Iteration-1.ppt b/s24/Common/10_Iteration-1/10_Iteration-1.ppt new file mode 100644 index 0000000000000000000000000000000000000000..377884cba89178eae90583f989ed1dee1547e966 Binary files /dev/null and b/s24/Common/10_Iteration-1/10_Iteration-1.ppt differ diff --git a/s24/Common/11_Iteration-2/11_Iteration-2.pdf b/s24/Common/11_Iteration-2/11_Iteration-2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..48e42834c2d593856de9924f6808ee87ab0904d0 Binary files /dev/null and b/s24/Common/11_Iteration-2/11_Iteration-2.pdf differ diff --git a/s24/Common/11_Iteration-2/11_Iteration-2.ppt b/s24/Common/11_Iteration-2/11_Iteration-2.ppt new file mode 100644 index 0000000000000000000000000000000000000000..b055565530cc47257ffe216df37adab156cef3e8 Binary files /dev/null and b/s24/Common/11_Iteration-2/11_Iteration-2.ppt differ diff --git a/s24/Common/13_Strings/13_Strings.pdf b/s24/Common/13_Strings/13_Strings.pdf new file mode 100644 index 0000000000000000000000000000000000000000..8375287e0966f385416a05bb1f7135db392c01a5 Binary files /dev/null and b/s24/Common/13_Strings/13_Strings.pdf differ diff --git a/s24/Common/13_Strings/13_Strings.pptx b/s24/Common/13_Strings/13_Strings.pptx new file mode 100644 index 0000000000000000000000000000000000000000..83c98e6a0738bf54e0ec18e23a3c012f41815440 Binary files /dev/null and b/s24/Common/13_Strings/13_Strings.pptx differ diff --git a/s24/Common/14_Lists/14_Lists.pdf b/s24/Common/14_Lists/14_Lists.pdf new file mode 100644 index 0000000000000000000000000000000000000000..22776930856eba8e71e9ef5c5ef9dd6fe38e0295 Binary files /dev/null and b/s24/Common/14_Lists/14_Lists.pdf differ diff --git a/s24/Common/14_Lists/14_Lists.pptx b/s24/Common/14_Lists/14_Lists.pptx new file mode 100644 index 0000000000000000000000000000000000000000..571f800bc1f878b9772fac7b84db3743272b89bb Binary files /dev/null and b/s24/Common/14_Lists/14_Lists.pptx differ diff --git a/s24/Common/15_CSV_Files/15_CSV_Files.pdf b/s24/Common/15_CSV_Files/15_CSV_Files.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b79b6ff0ae07ecf40dfe0475e748890cb3e5d257 Binary files /dev/null and b/s24/Common/15_CSV_Files/15_CSV_Files.pdf differ diff --git a/s24/Common/15_CSV_Files/15_CSV_Files.pptx b/s24/Common/15_CSV_Files/15_CSV_Files.pptx new file mode 100644 index 0000000000000000000000000000000000000000..94ac05d93b4c1a22562d1c2de5e9c9e8961dcd31 Binary files /dev/null and b/s24/Common/15_CSV_Files/15_CSV_Files.pptx differ diff --git a/s24/Common/16_List_Practice/lec-16-worksheet-list-practice.docx b/s24/Common/16_List_Practice/lec-16-worksheet-list-practice.docx new file mode 100644 index 0000000000000000000000000000000000000000..00aec20ad968f52645a41379d5a23eba6768c59c Binary files /dev/null and b/s24/Common/16_List_Practice/lec-16-worksheet-list-practice.docx differ diff --git a/s24/Common/16_List_Practice/lec-16-worksheet.pdf b/s24/Common/16_List_Practice/lec-16-worksheet.pdf new file mode 100644 index 0000000000000000000000000000000000000000..41b9be60932ad7452adab662eebc14db1e262a14 Binary files /dev/null and b/s24/Common/16_List_Practice/lec-16-worksheet.pdf differ diff --git a/s24/Common/17_Dictionaries-1/17_Dictionaries-1.pdf b/s24/Common/17_Dictionaries-1/17_Dictionaries-1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..10bc28e20e3d0e3975fd10219fd7f3d2fe4d069a Binary files /dev/null and b/s24/Common/17_Dictionaries-1/17_Dictionaries-1.pdf differ diff --git a/s24/Common/17_Dictionaries-1/17_Dictionaries-1.pptx b/s24/Common/17_Dictionaries-1/17_Dictionaries-1.pptx new file mode 100644 index 0000000000000000000000000000000000000000..f05edac18f768b6e2e87ccb9f29d71e230930470 Binary files /dev/null and b/s24/Common/17_Dictionaries-1/17_Dictionaries-1.pptx differ diff --git a/s24/Common/18_Dictionaries-2/18_Dictionaries-2.pdf b/s24/Common/18_Dictionaries-2/18_Dictionaries-2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4177e065184b2414066e0fb5a3ab428a8876d32c Binary files /dev/null and b/s24/Common/18_Dictionaries-2/18_Dictionaries-2.pdf differ diff --git a/s24/Common/18_Dictionaries-2/18_Dictionaries-2.pptx b/s24/Common/18_Dictionaries-2/18_Dictionaries-2.pptx new file mode 100644 index 0000000000000000000000000000000000000000..fc50379327304a9d04f80a9e503aad37e70643aa Binary files /dev/null and b/s24/Common/18_Dictionaries-2/18_Dictionaries-2.pptx differ diff --git a/s24/Common/19_JSON/19_JSON.pdf b/s24/Common/19_JSON/19_JSON.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9a14651b302fbfac18d19e44e2a74de32007415d Binary files /dev/null and b/s24/Common/19_JSON/19_JSON.pdf differ diff --git a/s24/Common/19_JSON/19_JSON.pptx b/s24/Common/19_JSON/19_JSON.pptx new file mode 100644 index 0000000000000000000000000000000000000000..695a8d183a8d179b014763cae57fc213a82fb434 Binary files /dev/null and b/s24/Common/19_JSON/19_JSON.pptx differ diff --git a/s24/Common/20_Objects_and_Tuples/20_Objects_and_Tuples.pdf b/s24/Common/20_Objects_and_Tuples/20_Objects_and_Tuples.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5f7bdd99b73f1db81cb6ea155950b69c427f2eee Binary files /dev/null and b/s24/Common/20_Objects_and_Tuples/20_Objects_and_Tuples.pdf differ diff --git a/s24/Common/20_Objects_and_Tuples/20_Objects_and_Tuples.pptx b/s24/Common/20_Objects_and_Tuples/20_Objects_and_Tuples.pptx new file mode 100644 index 0000000000000000000000000000000000000000..81b1dbe99cea3a05ef110a204e48acd5c23cbc41 Binary files /dev/null and b/s24/Common/20_Objects_and_Tuples/20_Objects_and_Tuples.pptx differ diff --git a/s24/Common/21_Copying/21_Copying.pdf b/s24/Common/21_Copying/21_Copying.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ad9a3ee71ddf801457793653f5f38937f0cfc925 Binary files /dev/null and b/s24/Common/21_Copying/21_Copying.pdf differ diff --git a/s24/Common/21_Copying/21_Copying.pptx b/s24/Common/21_Copying/21_Copying.pptx new file mode 100644 index 0000000000000000000000000000000000000000..07b33a09fe3f50e992de925a7dd7680ab02e0f73 Binary files /dev/null and b/s24/Common/21_Copying/21_Copying.pptx differ diff --git a/s24/Common/23_Function_References/23_Function_References.pdf b/s24/Common/23_Function_References/23_Function_References.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ab0111aa621f0c95a992dc3781192e4befdf9ca6 Binary files /dev/null and b/s24/Common/23_Function_References/23_Function_References.pdf differ diff --git a/s24/Common/23_Function_References/23_Function_References.pptx b/s24/Common/23_Function_References/23_Function_References.pptx new file mode 100644 index 0000000000000000000000000000000000000000..d37de2d96eac827735e46af205f0086fd7d9a1bc Binary files /dev/null and b/s24/Common/23_Function_References/23_Function_References.pptx differ diff --git a/s24/Common/26_Files_and_Directories/26_Files_and_Directories.pdf b/s24/Common/26_Files_and_Directories/26_Files_and_Directories.pdf new file mode 100644 index 0000000000000000000000000000000000000000..aca6dc42268016b34a9ffe8c5fb87f750036dcc4 Binary files /dev/null and b/s24/Common/26_Files_and_Directories/26_Files_and_Directories.pdf differ diff --git a/s24/Common/26_Files_and_Directories/26_Files_and_Directories.pptx b/s24/Common/26_Files_and_Directories/26_Files_and_Directories.pptx new file mode 100644 index 0000000000000000000000000000000000000000..e5d2214b0ada02b28edd8b4c3f0732113f1c6709 Binary files /dev/null and b/s24/Common/26_Files_and_Directories/26_Files_and_Directories.pptx differ diff --git a/s24/Common/28_Pandas-2/lec-28-worksheet.docx b/s24/Common/28_Pandas-2/lec-28-worksheet.docx new file mode 100644 index 0000000000000000000000000000000000000000..44c989528208b936293638d313d70e08b015c66c Binary files /dev/null and b/s24/Common/28_Pandas-2/lec-28-worksheet.docx differ diff --git a/s24/Common/32_Database-1/32_Database-1.pdf b/s24/Common/32_Database-1/32_Database-1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3b64368ae5949f92370f0febb16177a96d8a9683 Binary files /dev/null and b/s24/Common/32_Database-1/32_Database-1.pdf differ diff --git a/s24/Common/32_Database-1/32_Database-1.pptx b/s24/Common/32_Database-1/32_Database-1.pptx new file mode 100644 index 0000000000000000000000000000000000000000..91d8662cfab16452f2a2c4f303db12741097d58a Binary files /dev/null and b/s24/Common/32_Database-1/32_Database-1.pptx differ diff --git a/s24/old_exams/.gitkeep b/s24/old_exams/.gitkeep new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/s24/old_exams/exam1/f18-exam1-key.pdf b/s24/old_exams/exam1/f18-exam1-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..66f5a4efc823060abc03741e884631d06738f832 Binary files /dev/null and b/s24/old_exams/exam1/f18-exam1-key.pdf differ diff --git a/s24/old_exams/exam1/f18-exam1.pdf b/s24/old_exams/exam1/f18-exam1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..14eef2dfc61831bfcb3124e35f9ea633699a91e1 Binary files /dev/null and b/s24/old_exams/exam1/f18-exam1.pdf differ diff --git a/s24/old_exams/exam1/f19-exam-key.pdf b/s24/old_exams/exam1/f19-exam-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ae90fd31a8ef9f1a25416008598f3518f1d587dd Binary files /dev/null and b/s24/old_exams/exam1/f19-exam-key.pdf differ diff --git a/s24/old_exams/exam1/f19-exam.pdf b/s24/old_exams/exam1/f19-exam.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9f35da036101a661f8523c810155035fa2d14f6f Binary files /dev/null and b/s24/old_exams/exam1/f19-exam.pdf differ diff --git a/s24/old_exams/exam1/f21-exam-key.pdf b/s24/old_exams/exam1/f21-exam-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..00f624db777607561e687c89bd7daa321033ccc3 Binary files /dev/null and b/s24/old_exams/exam1/f21-exam-key.pdf differ diff --git a/s24/old_exams/exam1/f21-exam.pdf b/s24/old_exams/exam1/f21-exam.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0552be454b489d36983aadde11c997cfac1321d0 Binary files /dev/null and b/s24/old_exams/exam1/f21-exam.pdf differ diff --git a/s24/old_exams/exam1/f22-exam1-key.pdf b/s24/old_exams/exam1/f22-exam1-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..21c7a858cdf8aa06ad6dda4cb4a3bbae4b4d4f57 Binary files /dev/null and b/s24/old_exams/exam1/f22-exam1-key.pdf differ diff --git a/s24/old_exams/exam1/f22-exam1.pdf b/s24/old_exams/exam1/f22-exam1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0344489dfc6c544f19c7aaf9b9be7fec68d40549 Binary files /dev/null and b/s24/old_exams/exam1/f22-exam1.pdf differ diff --git a/s24/old_exams/exam1/s19-exam1-key.pdf b/s24/old_exams/exam1/s19-exam1-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ccd73242d1dfff67349903179629dbe39ae4bf0c Binary files /dev/null and b/s24/old_exams/exam1/s19-exam1-key.pdf differ diff --git a/s24/old_exams/exam1/s19-exam1.pdf b/s24/old_exams/exam1/s19-exam1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ee1286eb2271f1edd0d0ba1d48d62cd61f89f395 Binary files /dev/null and b/s24/old_exams/exam1/s19-exam1.pdf differ diff --git a/s24/old_exams/exam1/s20-exam-key.pdf b/s24/old_exams/exam1/s20-exam-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4c066df486b5ed0a05e9e8cc9b76b621ae464324 Binary files /dev/null and b/s24/old_exams/exam1/s20-exam-key.pdf differ diff --git a/s24/old_exams/exam1/s20-exam.pdf b/s24/old_exams/exam1/s20-exam.pdf new file mode 100644 index 0000000000000000000000000000000000000000..77b369d86065ba35853272d1b828289096a8f244 Binary files /dev/null and b/s24/old_exams/exam1/s20-exam.pdf differ diff --git a/s24/old_exams/exam1/s22-exam1-key.pdf b/s24/old_exams/exam1/s22-exam1-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7e17c479d48ffec77120b3af739a6a12314d2ece Binary files /dev/null and b/s24/old_exams/exam1/s22-exam1-key.pdf differ diff --git a/s24/old_exams/exam1/s22-exam1.pdf b/s24/old_exams/exam1/s22-exam1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3fbfad7a0b4d9f7fc924546a1290b0c397dedbf5 Binary files /dev/null and b/s24/old_exams/exam1/s22-exam1.pdf differ diff --git a/s24/old_exams/exam1/s23-exam-1.pdf b/s24/old_exams/exam1/s23-exam-1.pdf new file mode 100644 index 0000000000000000000000000000000000000000..752cdd7df5d9d9cf3c7877bebf8647adf4cc580b Binary files /dev/null and b/s24/old_exams/exam1/s23-exam-1.pdf differ diff --git a/s24/old_exams/exam1/s23-exam1-key.pdf b/s24/old_exams/exam1/s23-exam1-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..96a668e0162ea731a09eefa7b407a4058e871ceb Binary files /dev/null and b/s24/old_exams/exam1/s23-exam1-key.pdf differ diff --git a/s24/old_exams/exam2/f18-exam2-key.pdf b/s24/old_exams/exam2/f18-exam2-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0deb2fc046b91ea891cf692842110466d47a6af2 Binary files /dev/null and b/s24/old_exams/exam2/f18-exam2-key.pdf differ diff --git a/s24/old_exams/exam2/f18-exam2.pdf b/s24/old_exams/exam2/f18-exam2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bb48b7c1aab65675b905f328daf1de54b7987a77 Binary files /dev/null and b/s24/old_exams/exam2/f18-exam2.pdf differ diff --git a/s24/old_exams/exam2/f19-exam2-key.pdf b/s24/old_exams/exam2/f19-exam2-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..830d2f63ad666ebfee6085b6946df2d5846272b3 Binary files /dev/null and b/s24/old_exams/exam2/f19-exam2-key.pdf differ diff --git a/s24/old_exams/exam2/f19-exam2.pdf b/s24/old_exams/exam2/f19-exam2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..4261bd18c197bfc089360b3491e7025e73f01eef Binary files /dev/null and b/s24/old_exams/exam2/f19-exam2.pdf differ diff --git a/s24/old_exams/exam2/f21-exam-key.pdf b/s24/old_exams/exam2/f21-exam-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..9cb29c5a9166ef3c70d56d1eeb3fd6f236e60ae8 Binary files /dev/null and b/s24/old_exams/exam2/f21-exam-key.pdf differ diff --git a/s24/old_exams/exam2/f21-exam.pdf b/s24/old_exams/exam2/f21-exam.pdf new file mode 100644 index 0000000000000000000000000000000000000000..46776e374ef6c44d5310a4431cf4137056717d40 Binary files /dev/null and b/s24/old_exams/exam2/f21-exam.pdf differ diff --git a/s24/old_exams/exam2/f22-exam-key.pdf b/s24/old_exams/exam2/f22-exam-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c28079c472b9a4a60565e271073e808c83b4d84b Binary files /dev/null and b/s24/old_exams/exam2/f22-exam-key.pdf differ diff --git a/s24/old_exams/exam2/f22-exam.pdf b/s24/old_exams/exam2/f22-exam.pdf new file mode 100644 index 0000000000000000000000000000000000000000..07603f29503dda3d31b00e6b496818e369ced171 Binary files /dev/null and b/s24/old_exams/exam2/f22-exam.pdf differ diff --git a/s24/old_exams/exam2/s19-exam2-key.pdf b/s24/old_exams/exam2/s19-exam2-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..5a4154212a9c9fe117e2c89733c527418f7d5a27 Binary files /dev/null and b/s24/old_exams/exam2/s19-exam2-key.pdf differ diff --git a/s24/old_exams/exam2/s19-exam2.pdf b/s24/old_exams/exam2/s19-exam2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..1efdd818ab18490b0ccdc029a256a4e8ef66a06b Binary files /dev/null and b/s24/old_exams/exam2/s19-exam2.pdf differ diff --git a/s24/old_exams/exam2/s22-exam2-key.pdf b/s24/old_exams/exam2/s22-exam2-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..c4de6556b8bd9a3ea11072baea6ad9e05ec94d8f Binary files /dev/null and b/s24/old_exams/exam2/s22-exam2-key.pdf differ diff --git a/s24/old_exams/exam2/s22-exam2.pdf b/s24/old_exams/exam2/s22-exam2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e45feb3e45760826cc6d341e9b54423a9732c270 Binary files /dev/null and b/s24/old_exams/exam2/s22-exam2.pdf differ diff --git a/s24/old_exams/exam2/s23-exam2-key.pdf b/s24/old_exams/exam2/s23-exam2-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..0cea2f5799b393706316e95e3b8f0add03f87aff Binary files /dev/null and b/s24/old_exams/exam2/s23-exam2-key.pdf differ diff --git a/s24/old_exams/exam2/s23-exam2.pdf b/s24/old_exams/exam2/s23-exam2.pdf new file mode 100644 index 0000000000000000000000000000000000000000..6f8ccdc19f38e5a844d0ee297c955e3e83a3571b Binary files /dev/null and b/s24/old_exams/exam2/s23-exam2.pdf differ diff --git a/s24/old_exams/final/f18-final-key.pdf b/s24/old_exams/final/f18-final-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..a82608e7b281c05f4fe83dbf65cc97e162a7e954 Binary files /dev/null and b/s24/old_exams/final/f18-final-key.pdf differ diff --git a/s24/old_exams/final/f18-final.pdf b/s24/old_exams/final/f18-final.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e8e95360a43ff09fe48f9920ea76f4261c71d440 Binary files /dev/null and b/s24/old_exams/final/f18-final.pdf differ diff --git a/s24/old_exams/final/f19-exam-key.pdf b/s24/old_exams/final/f19-exam-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..97236b560b1d36d9e1f712af4567c8a02a6add2a Binary files /dev/null and b/s24/old_exams/final/f19-exam-key.pdf differ diff --git a/s24/old_exams/final/f19-exam.pdf b/s24/old_exams/final/f19-exam.pdf new file mode 100644 index 0000000000000000000000000000000000000000..45373ab6bea876b90bf75db0114b83cdf5082291 Binary files /dev/null and b/s24/old_exams/final/f19-exam.pdf differ diff --git a/s24/old_exams/final/f21-final-key.pdf b/s24/old_exams/final/f21-final-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..b114ec77bc1ab54d4c50e19c557236ad92b268e7 Binary files /dev/null and b/s24/old_exams/final/f21-final-key.pdf differ diff --git a/s24/old_exams/final/f21-final.pdf b/s24/old_exams/final/f21-final.pdf new file mode 100644 index 0000000000000000000000000000000000000000..f28b110dfc1f627543af3e67b9a8fa9d154938f6 Binary files /dev/null and b/s24/old_exams/final/f21-final.pdf differ diff --git a/s24/old_exams/final/f22-final-key.pdf b/s24/old_exams/final/f22-final-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..93c01070c91e0d5ee873c190dfbb78d798520476 Binary files /dev/null and b/s24/old_exams/final/f22-final-key.pdf differ diff --git a/s24/old_exams/final/f22-final.pdf b/s24/old_exams/final/f22-final.pdf new file mode 100644 index 0000000000000000000000000000000000000000..48bb649dcb2b424778bf4a374dd9b4739744cf70 Binary files /dev/null and b/s24/old_exams/final/f22-final.pdf differ diff --git a/s24/old_exams/final/s19-final-key.pdf b/s24/old_exams/final/s19-final-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e14805c9a07ebf4c28944714d325a812fd7b2f9d Binary files /dev/null and b/s24/old_exams/final/s19-final-key.pdf differ diff --git a/s24/old_exams/final/s19-final.pdf b/s24/old_exams/final/s19-final.pdf new file mode 100644 index 0000000000000000000000000000000000000000..db26164a78fd79a8969999c35e6718df96d8d3a0 Binary files /dev/null and b/s24/old_exams/final/s19-final.pdf differ diff --git a/s24/old_exams/final/s22-final-key.pdf b/s24/old_exams/final/s22-final-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..3b53d1959d4d4251fbecf2aa149aeea63757ac6a Binary files /dev/null and b/s24/old_exams/final/s22-final-key.pdf differ diff --git a/s24/old_exams/final/s22-final.pdf b/s24/old_exams/final/s22-final.pdf new file mode 100644 index 0000000000000000000000000000000000000000..bd1c8ce1bdf7e8d20b5c6717b5502881b1fae8f0 Binary files /dev/null and b/s24/old_exams/final/s22-final.pdf differ diff --git a/s24/old_exams/final/s23-final-key.pdf b/s24/old_exams/final/s23-final-key.pdf new file mode 100644 index 0000000000000000000000000000000000000000..7c3569e3ffb7e16a11ce089b1ffceae21925e526 Binary files /dev/null and b/s24/old_exams/final/s23-final-key.pdf differ diff --git a/s24/old_exams/final/s23-final.pdf b/s24/old_exams/final/s23-final.pdf new file mode 100644 index 0000000000000000000000000000000000000000..ccdbbefd2285ec8b35eb0b1d3c24db8860fc2a21 Binary files /dev/null and b/s24/old_exams/final/s23-final.pdf differ