From 9366929c964658ea8f07ca3fd4a5cb544bd6b06d Mon Sep 17 00:00:00 2001 From: ashwinmaran <amaran@wisc.edu> Date: Wed, 1 Nov 2023 19:07:25 -0500 Subject: [PATCH] lab-p9 q9 typo fix + p9 public_tests fix --- lab-p9/README.md | 2 + lab-p9/lab-p9.ipynb | 338 ++++++++++++++++++++++---------------------- p9/README.md | 2 +- p9/p9.ipynb | 286 ++++++++++++++++++------------------- p9/public_tests.py | 12 +- 5 files changed, 322 insertions(+), 318 deletions(-) diff --git a/lab-p9/README.md b/lab-p9/README.md index fb260ca..c7cda30 100644 --- a/lab-p9/README.md +++ b/lab-p9/README.md @@ -5,6 +5,8 @@ In this lab, you'll learn to create simple plots and take your sorting to the ne ----------------------------- ## Corrections/Clarifications +* **(11/1/2023) - 7:00 PM**: Minor typo in Q9 and Q10 of `lab-p9.ipynb` fixed. You do **NOT** have to redownload any files. + **Find any issues?** Please report to us: diff --git a/lab-p9/lab-p9.ipynb b/lab-p9/lab-p9.ipynb index fbc642d..4abf73e 100644 --- a/lab-p9/lab-p9.ipynb +++ b/lab-p9/lab-p9.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": null, - "id": "322134ce", + "id": "e7075d16", "metadata": { "cell_type": "code", "deletable": false, @@ -23,10 +23,10 @@ "metadata": { "editable": false, "execution": { - "iopub.execute_input": "2023-11-01T02:55:58.449355Z", - "iopub.status.busy": "2023-11-01T02:55:58.448355Z", - "iopub.status.idle": "2023-11-01T02:55:58.649335Z", - "shell.execute_reply": "2023-11-01T02:55:58.648324Z" + "iopub.execute_input": "2023-11-01T23:46:26.534702Z", + "iopub.status.busy": "2023-11-01T23:46:26.534702Z", + "iopub.status.idle": "2023-11-01T23:46:26.730531Z", + "shell.execute_reply": "2023-11-01T23:46:26.729524Z" } }, "outputs": [], @@ -109,10 +109,10 @@ "id": "bc8a46b0", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:55:58.654492Z", - "iopub.status.busy": "2023-11-01T02:55:58.653491Z", - "iopub.status.idle": "2023-11-01T02:55:59.913173Z", - "shell.execute_reply": "2023-11-01T02:55:59.912107Z" + "iopub.execute_input": "2023-11-01T23:46:26.735532Z", + "iopub.status.busy": "2023-11-01T23:46:26.734532Z", + "iopub.status.idle": "2023-11-01T23:46:28.006035Z", + "shell.execute_reply": "2023-11-01T23:46:28.005026Z" }, "tags": [] }, @@ -154,10 +154,10 @@ "id": "2f712722", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:55:59.918260Z", - "iopub.status.busy": "2023-11-01T02:55:59.917260Z", - "iopub.status.idle": "2023-11-01T02:55:59.925026Z", - "shell.execute_reply": "2023-11-01T02:55:59.924017Z" + "iopub.execute_input": "2023-11-01T23:46:28.011036Z", + "iopub.status.busy": "2023-11-01T23:46:28.010036Z", + "iopub.status.idle": "2023-11-01T23:46:28.017064Z", + "shell.execute_reply": "2023-11-01T23:46:28.016057Z" } }, "outputs": [], @@ -188,10 +188,10 @@ "id": "e0df6ffe", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:55:59.929027Z", - "iopub.status.busy": "2023-11-01T02:55:59.929027Z", - "iopub.status.idle": "2023-11-01T02:55:59.940829Z", - "shell.execute_reply": "2023-11-01T02:55:59.939817Z" + "iopub.execute_input": "2023-11-01T23:46:28.021064Z", + "iopub.status.busy": "2023-11-01T23:46:28.020064Z", + "iopub.status.idle": "2023-11-01T23:46:28.031039Z", + "shell.execute_reply": "2023-11-01T23:46:28.030030Z" } }, "outputs": [], @@ -209,10 +209,10 @@ "id": "edd912b5", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:55:59.944020Z", - "iopub.status.busy": "2023-11-01T02:55:59.944020Z", - "iopub.status.idle": "2023-11-01T02:56:00.762420Z", - "shell.execute_reply": "2023-11-01T02:56:00.761410Z" + "iopub.execute_input": "2023-11-01T23:46:28.034038Z", + "iopub.status.busy": "2023-11-01T23:46:28.034038Z", + "iopub.status.idle": "2023-11-01T23:46:28.857231Z", + "shell.execute_reply": "2023-11-01T23:46:28.856041Z" } }, "outputs": [], @@ -242,10 +242,10 @@ "id": "eebd66cb", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:00.766600Z", - "iopub.status.busy": "2023-11-01T02:56:00.765597Z", - "iopub.status.idle": "2023-11-01T02:56:00.778583Z", - "shell.execute_reply": "2023-11-01T02:56:00.777575Z" + "iopub.execute_input": "2023-11-01T23:46:28.861250Z", + "iopub.status.busy": "2023-11-01T23:46:28.861250Z", + "iopub.status.idle": "2023-11-01T23:46:28.874303Z", + "shell.execute_reply": "2023-11-01T23:46:28.873286Z" } }, "outputs": [], @@ -316,10 +316,10 @@ "id": "d81a47b8", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:00.781584Z", - "iopub.status.busy": "2023-11-01T02:56:00.781584Z", - "iopub.status.idle": "2023-11-01T02:56:00.789286Z", - "shell.execute_reply": "2023-11-01T02:56:00.788258Z" + "iopub.execute_input": "2023-11-01T23:46:28.879296Z", + "iopub.status.busy": "2023-11-01T23:46:28.879296Z", + "iopub.status.idle": "2023-11-01T23:46:28.887963Z", + "shell.execute_reply": "2023-11-01T23:46:28.886952Z" } }, "outputs": [], @@ -339,10 +339,10 @@ "id": "92f1a013", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:00.792266Z", - "iopub.status.busy": "2023-11-01T02:56:00.792266Z", - "iopub.status.idle": "2023-11-01T02:56:01.023386Z", - "shell.execute_reply": "2023-11-01T02:56:01.022197Z" + "iopub.execute_input": "2023-11-01T23:46:28.891964Z", + "iopub.status.busy": "2023-11-01T23:46:28.891964Z", + "iopub.status.idle": "2023-11-01T23:46:29.141381Z", + "shell.execute_reply": "2023-11-01T23:46:29.140373Z" } }, "outputs": [], @@ -369,10 +369,10 @@ "id": "4914b598", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.027405Z", - "iopub.status.busy": "2023-11-01T02:56:01.026386Z", - "iopub.status.idle": "2023-11-01T02:56:01.253720Z", - "shell.execute_reply": "2023-11-01T02:56:01.252651Z" + "iopub.execute_input": "2023-11-01T23:46:29.145383Z", + "iopub.status.busy": "2023-11-01T23:46:29.144382Z", + "iopub.status.idle": "2023-11-01T23:46:29.374453Z", + "shell.execute_reply": "2023-11-01T23:46:29.373443Z" } }, "outputs": [], @@ -421,10 +421,10 @@ "id": "8f48a9cd", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.257871Z", - "iopub.status.busy": "2023-11-01T02:56:01.257871Z", - "iopub.status.idle": "2023-11-01T02:56:01.264693Z", - "shell.execute_reply": "2023-11-01T02:56:01.263659Z" + "iopub.execute_input": "2023-11-01T23:46:29.378645Z", + "iopub.status.busy": "2023-11-01T23:46:29.378645Z", + "iopub.status.idle": "2023-11-01T23:46:29.384212Z", + "shell.execute_reply": "2023-11-01T23:46:29.384212Z" }, "tags": [] }, @@ -459,10 +459,10 @@ "id": "2e671e56", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.269693Z", - "iopub.status.busy": "2023-11-01T02:56:01.268672Z", - "iopub.status.idle": "2023-11-01T02:56:01.275051Z", - "shell.execute_reply": "2023-11-01T02:56:01.275051Z" + "iopub.execute_input": "2023-11-01T23:46:29.389570Z", + "iopub.status.busy": "2023-11-01T23:46:29.389570Z", + "iopub.status.idle": "2023-11-01T23:46:29.395178Z", + "shell.execute_reply": "2023-11-01T23:46:29.395178Z" }, "tags": [] }, @@ -474,7 +474,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b51a072b", + "id": "4bb9dee9", "metadata": { "deletable": false, "editable": false @@ -501,10 +501,10 @@ "id": "ee5a7be4", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.292379Z", - "iopub.status.busy": "2023-11-01T02:56:01.292379Z", - "iopub.status.idle": "2023-11-01T02:56:01.298873Z", - "shell.execute_reply": "2023-11-01T02:56:01.297841Z" + "iopub.execute_input": "2023-11-01T23:46:29.412862Z", + "iopub.status.busy": "2023-11-01T23:46:29.412862Z", + "iopub.status.idle": "2023-11-01T23:46:29.420145Z", + "shell.execute_reply": "2023-11-01T23:46:29.419115Z" }, "tags": [] }, @@ -516,7 +516,7 @@ { "cell_type": "code", "execution_count": null, - "id": "c12a2a44", + "id": "4956436d", "metadata": { "deletable": false, "editable": false @@ -556,10 +556,10 @@ "id": "8c2e73b1", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.311659Z", - "iopub.status.busy": "2023-11-01T02:56:01.311659Z", - "iopub.status.idle": "2023-11-01T02:56:01.318082Z", - "shell.execute_reply": "2023-11-01T02:56:01.318082Z" + "iopub.execute_input": "2023-11-01T23:46:29.434884Z", + "iopub.status.busy": "2023-11-01T23:46:29.433904Z", + "iopub.status.idle": "2023-11-01T23:46:29.442097Z", + "shell.execute_reply": "2023-11-01T23:46:29.441070Z" }, "tags": [] }, @@ -571,7 +571,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a452edd", + "id": "f5ae4ff7", "metadata": { "deletable": false, "editable": false @@ -600,10 +600,10 @@ "id": "6dbce016", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.331876Z", - "iopub.status.busy": "2023-11-01T02:56:01.330857Z", - "iopub.status.idle": "2023-11-01T02:56:01.338083Z", - "shell.execute_reply": "2023-11-01T02:56:01.338083Z" + "iopub.execute_input": "2023-11-01T23:46:29.455122Z", + "iopub.status.busy": "2023-11-01T23:46:29.454122Z", + "iopub.status.idle": "2023-11-01T23:46:29.462792Z", + "shell.execute_reply": "2023-11-01T23:46:29.461782Z" }, "tags": [] }, @@ -615,7 +615,7 @@ { "cell_type": "code", "execution_count": null, - "id": "be0829bd", + "id": "fc34f75c", "metadata": { "deletable": false, "editable": false @@ -644,10 +644,10 @@ "id": "03bc0435", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.351979Z", - "iopub.status.busy": "2023-11-01T02:56:01.350958Z", - "iopub.status.idle": "2023-11-01T02:56:01.357517Z", - "shell.execute_reply": "2023-11-01T02:56:01.357517Z" + "iopub.execute_input": "2023-11-01T23:46:29.475961Z", + "iopub.status.busy": "2023-11-01T23:46:29.475961Z", + "iopub.status.idle": "2023-11-01T23:46:29.483460Z", + "shell.execute_reply": "2023-11-01T23:46:29.482447Z" } }, "outputs": [], @@ -725,10 +725,10 @@ "id": "03c721e8", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.362535Z", - "iopub.status.busy": "2023-11-01T02:56:01.361528Z", - "iopub.status.idle": "2023-11-01T02:56:01.368181Z", - "shell.execute_reply": "2023-11-01T02:56:01.368181Z" + "iopub.execute_input": "2023-11-01T23:46:29.487705Z", + "iopub.status.busy": "2023-11-01T23:46:29.487705Z", + "iopub.status.idle": "2023-11-01T23:46:29.495653Z", + "shell.execute_reply": "2023-11-01T23:46:29.494643Z" }, "tags": [] }, @@ -744,7 +744,7 @@ { "cell_type": "code", "execution_count": null, - "id": "7bee603a", + "id": "eb35ca12", "metadata": { "deletable": false, "editable": false @@ -788,10 +788,10 @@ "id": "dcb23f95", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.382178Z", - "iopub.status.busy": "2023-11-01T02:56:01.382178Z", - "iopub.status.idle": "2023-11-01T02:56:01.389240Z", - "shell.execute_reply": "2023-11-01T02:56:01.389240Z" + "iopub.execute_input": "2023-11-01T23:46:29.509220Z", + "iopub.status.busy": "2023-11-01T23:46:29.508214Z", + "iopub.status.idle": "2023-11-01T23:46:29.517059Z", + "shell.execute_reply": "2023-11-01T23:46:29.516023Z" }, "scrolled": true, "tags": [] @@ -815,7 +815,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bf319c24", + "id": "6c4f5a5c", "metadata": { "deletable": false, "editable": false @@ -850,10 +850,10 @@ "id": "f5bc9c6e", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.403912Z", - "iopub.status.busy": "2023-11-01T02:56:01.403912Z", - "iopub.status.idle": "2023-11-01T02:56:01.409281Z", - "shell.execute_reply": "2023-11-01T02:56:01.409281Z" + "iopub.execute_input": "2023-11-01T23:46:29.530651Z", + "iopub.status.busy": "2023-11-01T23:46:29.529653Z", + "iopub.status.idle": "2023-11-01T23:46:29.537398Z", + "shell.execute_reply": "2023-11-01T23:46:29.536389Z" }, "tags": [] }, @@ -865,7 +865,7 @@ { "cell_type": "code", "execution_count": null, - "id": "74a29813", + "id": "1b3eaade", "metadata": { "deletable": false, "editable": false @@ -915,10 +915,10 @@ "id": "a2dffde7", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.423044Z", - "iopub.status.busy": "2023-11-01T02:56:01.422833Z", - "iopub.status.idle": "2023-11-01T02:56:01.430498Z", - "shell.execute_reply": "2023-11-01T02:56:01.430498Z" + "iopub.execute_input": "2023-11-01T23:46:29.551048Z", + "iopub.status.busy": "2023-11-01T23:46:29.551048Z", + "iopub.status.idle": "2023-11-01T23:46:29.559398Z", + "shell.execute_reply": "2023-11-01T23:46:29.558710Z" }, "tags": [] }, @@ -930,7 +930,7 @@ { "cell_type": "code", "execution_count": null, - "id": "a6e989e3", + "id": "a833488f", "metadata": { "deletable": false, "editable": false @@ -952,7 +952,7 @@ "\n", "You **must** use `sorted_movies_data` to answer this question.\n", "\n", - "You are allowed to use the fact that sorted_movies_data is sorted in increasing order of the duration" + "You are allowed to use the fact that `sorted_movies_data` is sorted in decreasing order of the duration" ] }, { @@ -961,10 +961,10 @@ "id": "2023ae8c", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.445109Z", - "iopub.status.busy": "2023-11-01T02:56:01.444106Z", - "iopub.status.idle": "2023-11-01T02:56:01.450338Z", - "shell.execute_reply": "2023-11-01T02:56:01.450338Z" + "iopub.execute_input": "2023-11-01T23:46:29.573105Z", + "iopub.status.busy": "2023-11-01T23:46:29.573105Z", + "iopub.status.idle": "2023-11-01T23:46:29.579127Z", + "shell.execute_reply": "2023-11-01T23:46:29.579127Z" }, "tags": [] }, @@ -976,7 +976,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a837456", + "id": "ed87131e", "metadata": { "deletable": false, "editable": false @@ -998,7 +998,7 @@ "\n", "You **must** use `sorted_movies_data` to answer this question.\n", "\n", - "You are allowed to use the fact that sorted_movies_data is sorted in increasing order of the duration" + "You are allowed to use the fact that `sorted_movies_data` is sorted in decreasing order of the duration" ] }, { @@ -1007,10 +1007,10 @@ "id": "2efc868f", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.464616Z", - "iopub.status.busy": "2023-11-01T02:56:01.464616Z", - "iopub.status.idle": "2023-11-01T02:56:01.470369Z", - "shell.execute_reply": "2023-11-01T02:56:01.470369Z" + "iopub.execute_input": "2023-11-01T23:46:29.594035Z", + "iopub.status.busy": "2023-11-01T23:46:29.593043Z", + "iopub.status.idle": "2023-11-01T23:46:29.600850Z", + "shell.execute_reply": "2023-11-01T23:46:29.599761Z" }, "tags": [] }, @@ -1022,7 +1022,7 @@ { "cell_type": "code", "execution_count": null, - "id": "263f652b", + "id": "e1cdcc82", "metadata": { "deletable": false, "editable": false @@ -1090,10 +1090,10 @@ "id": "a1eea171", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.484607Z", - "iopub.status.busy": "2023-11-01T02:56:01.483581Z", - "iopub.status.idle": "2023-11-01T02:56:01.499613Z", - "shell.execute_reply": "2023-11-01T02:56:01.498582Z" + "iopub.execute_input": "2023-11-01T23:46:29.614415Z", + "iopub.status.busy": "2023-11-01T23:46:29.614415Z", + "iopub.status.idle": "2023-11-01T23:46:29.631934Z", + "shell.execute_reply": "2023-11-01T23:46:29.630911Z" }, "tags": [] }, @@ -1114,7 +1114,7 @@ { "cell_type": "code", "execution_count": null, - "id": "541c3d43", + "id": "9b4a87d3", "metadata": { "deletable": false, "editable": false @@ -1143,10 +1143,10 @@ "id": "338e9a6b", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.515045Z", - "iopub.status.busy": "2023-11-01T02:56:01.515045Z", - "iopub.status.idle": "2023-11-01T02:56:01.520422Z", - "shell.execute_reply": "2023-11-01T02:56:01.520422Z" + "iopub.execute_input": "2023-11-01T23:46:29.647939Z", + "iopub.status.busy": "2023-11-01T23:46:29.647939Z", + "iopub.status.idle": "2023-11-01T23:46:29.655042Z", + "shell.execute_reply": "2023-11-01T23:46:29.654033Z" }, "tags": [] }, @@ -1158,7 +1158,7 @@ { "cell_type": "code", "execution_count": null, - "id": "19bd6554", + "id": "c6324011", "metadata": { "deletable": false, "editable": false @@ -1187,10 +1187,10 @@ "id": "f80d76fb", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.534576Z", - "iopub.status.busy": "2023-11-01T02:56:01.534576Z", - "iopub.status.idle": "2023-11-01T02:56:01.540025Z", - "shell.execute_reply": "2023-11-01T02:56:01.540025Z" + "iopub.execute_input": "2023-11-01T23:46:29.668199Z", + "iopub.status.busy": "2023-11-01T23:46:29.668199Z", + "iopub.status.idle": "2023-11-01T23:46:29.674913Z", + "shell.execute_reply": "2023-11-01T23:46:29.673903Z" }, "tags": [] }, @@ -1202,7 +1202,7 @@ { "cell_type": "code", "execution_count": null, - "id": "bb682dcd", + "id": "d8c05c5b", "metadata": { "deletable": false, "editable": false @@ -1233,10 +1233,10 @@ "id": "e1cdaad5", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.554206Z", - "iopub.status.busy": "2023-11-01T02:56:01.552975Z", - "iopub.status.idle": "2023-11-01T02:56:01.561994Z", - "shell.execute_reply": "2023-11-01T02:56:01.560978Z" + "iopub.execute_input": "2023-11-01T23:46:29.688444Z", + "iopub.status.busy": "2023-11-01T23:46:29.688444Z", + "iopub.status.idle": "2023-11-01T23:46:29.697030Z", + "shell.execute_reply": "2023-11-01T23:46:29.696000Z" }, "tags": [] }, @@ -1248,7 +1248,7 @@ { "cell_type": "code", "execution_count": null, - "id": "2a7691f5", + "id": "dc8d0a3c", "metadata": { "deletable": false, "editable": false @@ -1290,10 +1290,10 @@ "id": "280dcba4", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.575449Z", - "iopub.status.busy": "2023-11-01T02:56:01.574449Z", - "iopub.status.idle": "2023-11-01T02:56:01.581791Z", - "shell.execute_reply": "2023-11-01T02:56:01.580772Z" + "iopub.execute_input": "2023-11-01T23:46:29.710230Z", + "iopub.status.busy": "2023-11-01T23:46:29.709227Z", + "iopub.status.idle": "2023-11-01T23:46:29.716655Z", + "shell.execute_reply": "2023-11-01T23:46:29.715560Z" }, "tags": [] }, @@ -1330,10 +1330,10 @@ "id": "4491fafb", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.585987Z", - "iopub.status.busy": "2023-11-01T02:56:01.585987Z", - "iopub.status.idle": "2023-11-01T02:56:01.592747Z", - "shell.execute_reply": "2023-11-01T02:56:01.591717Z" + "iopub.execute_input": "2023-11-01T23:46:29.720828Z", + "iopub.status.busy": "2023-11-01T23:46:29.720828Z", + "iopub.status.idle": "2023-11-01T23:46:29.727861Z", + "shell.execute_reply": "2023-11-01T23:46:29.726851Z" }, "tags": [] }, @@ -1351,7 +1351,7 @@ { "cell_type": "code", "execution_count": null, - "id": "8c6c7161", + "id": "4a3afa2c", "metadata": { "deletable": false, "editable": false @@ -1393,10 +1393,10 @@ "id": "26d489a4", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.605738Z", - "iopub.status.busy": "2023-11-01T02:56:01.604720Z", - "iopub.status.idle": "2023-11-01T02:56:01.612215Z", - "shell.execute_reply": "2023-11-01T02:56:01.612215Z" + "iopub.execute_input": "2023-11-01T23:46:29.741143Z", + "iopub.status.busy": "2023-11-01T23:46:29.740141Z", + "iopub.status.idle": "2023-11-01T23:46:29.748118Z", + "shell.execute_reply": "2023-11-01T23:46:29.748118Z" }, "tags": [] }, @@ -1408,7 +1408,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5ce28a92", + "id": "7b7c7dd8", "metadata": { "deletable": false, "editable": false @@ -1437,10 +1437,10 @@ "id": "e77476da", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.625543Z", - "iopub.status.busy": "2023-11-01T02:56:01.625543Z", - "iopub.status.idle": "2023-11-01T02:56:01.631571Z", - "shell.execute_reply": "2023-11-01T02:56:01.631571Z" + "iopub.execute_input": "2023-11-01T23:46:29.762833Z", + "iopub.status.busy": "2023-11-01T23:46:29.762833Z", + "iopub.status.idle": "2023-11-01T23:46:29.769786Z", + "shell.execute_reply": "2023-11-01T23:46:29.768768Z" }, "tags": [] }, @@ -1452,7 +1452,7 @@ { "cell_type": "code", "execution_count": null, - "id": "83772214", + "id": "86ad9d5a", "metadata": { "deletable": false, "editable": false @@ -1490,10 +1490,10 @@ "id": "a5b1ff77", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.645862Z", - "iopub.status.busy": "2023-11-01T02:56:01.644869Z", - "iopub.status.idle": "2023-11-01T02:56:01.651497Z", - "shell.execute_reply": "2023-11-01T02:56:01.651497Z" + "iopub.execute_input": "2023-11-01T23:46:29.783133Z", + "iopub.status.busy": "2023-11-01T23:46:29.783133Z", + "iopub.status.idle": "2023-11-01T23:46:29.790195Z", + "shell.execute_reply": "2023-11-01T23:46:29.789510Z" }, "tags": [] }, @@ -1509,7 +1509,7 @@ { "cell_type": "code", "execution_count": null, - "id": "93a706ed", + "id": "e52de9a0", "metadata": { "deletable": false, "editable": false @@ -1558,10 +1558,10 @@ "id": "ddbace04", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:01.665620Z", - "iopub.status.busy": "2023-11-01T02:56:01.665620Z", - "iopub.status.idle": "2023-11-01T02:56:02.099180Z", - "shell.execute_reply": "2023-11-01T02:56:02.098169Z" + "iopub.execute_input": "2023-11-01T23:46:29.803420Z", + "iopub.status.busy": "2023-11-01T23:46:29.803420Z", + "iopub.status.idle": "2023-11-01T23:46:30.240807Z", + "shell.execute_reply": "2023-11-01T23:46:30.239797Z" }, "tags": [] }, @@ -1589,10 +1589,10 @@ "id": "52789740", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:02.103183Z", - "iopub.status.busy": "2023-11-01T02:56:02.103183Z", - "iopub.status.idle": "2023-11-01T02:56:02.111467Z", - "shell.execute_reply": "2023-11-01T02:56:02.110450Z" + "iopub.execute_input": "2023-11-01T23:46:30.244827Z", + "iopub.status.busy": "2023-11-01T23:46:30.244827Z", + "iopub.status.idle": "2023-11-01T23:46:30.251246Z", + "shell.execute_reply": "2023-11-01T23:46:30.251246Z" }, "tags": [] }, @@ -1606,7 +1606,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9fea8e2e", + "id": "d5ecb3ed", "metadata": { "deletable": false, "editable": false @@ -1653,10 +1653,10 @@ "id": "5f9dae82", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:02.125252Z", - "iopub.status.busy": "2023-11-01T02:56:02.124258Z", - "iopub.status.idle": "2023-11-01T02:56:02.543573Z", - "shell.execute_reply": "2023-11-01T02:56:02.543441Z" + "iopub.execute_input": "2023-11-01T23:46:30.265879Z", + "iopub.status.busy": "2023-11-01T23:46:30.265879Z", + "iopub.status.idle": "2023-11-01T23:46:30.688484Z", + "shell.execute_reply": "2023-11-01T23:46:30.687473Z" }, "tags": [] }, @@ -1682,10 +1682,10 @@ "id": "6f40883c", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:02.548579Z", - "iopub.status.busy": "2023-11-01T02:56:02.548579Z", - "iopub.status.idle": "2023-11-01T02:56:02.555415Z", - "shell.execute_reply": "2023-11-01T02:56:02.554401Z" + "iopub.execute_input": "2023-11-01T23:46:30.692504Z", + "iopub.status.busy": "2023-11-01T23:46:30.692504Z", + "iopub.status.idle": "2023-11-01T23:46:30.699422Z", + "shell.execute_reply": "2023-11-01T23:46:30.698392Z" }, "tags": [] }, @@ -1697,7 +1697,7 @@ { "cell_type": "code", "execution_count": null, - "id": "173342b1", + "id": "a9bf6471", "metadata": { "deletable": false, "editable": false @@ -1726,10 +1726,10 @@ "id": "42dd594f", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:02.568954Z", - "iopub.status.busy": "2023-11-01T02:56:02.567956Z", - "iopub.status.idle": "2023-11-01T02:56:02.575630Z", - "shell.execute_reply": "2023-11-01T02:56:02.574620Z" + "iopub.execute_input": "2023-11-01T23:46:30.712409Z", + "iopub.status.busy": "2023-11-01T23:46:30.712409Z", + "iopub.status.idle": "2023-11-01T23:46:30.719245Z", + "shell.execute_reply": "2023-11-01T23:46:30.718216Z" }, "tags": [] }, @@ -1741,7 +1741,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0ea1ee67", + "id": "73bf00d1", "metadata": { "deletable": false, "editable": false @@ -1772,10 +1772,10 @@ "id": "506abe13", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:56:02.590271Z", - "iopub.status.busy": "2023-11-01T02:56:02.590271Z", - "iopub.status.idle": "2023-11-01T02:56:02.598897Z", - "shell.execute_reply": "2023-11-01T02:56:02.597921Z" + "iopub.execute_input": "2023-11-01T23:46:30.732044Z", + "iopub.status.busy": "2023-11-01T23:46:30.732044Z", + "iopub.status.idle": "2023-11-01T23:46:30.740571Z", + "shell.execute_reply": "2023-11-01T23:46:30.739542Z" }, "tags": [] }, @@ -1787,7 +1787,7 @@ { "cell_type": "code", "execution_count": null, - "id": "5286f7a0", + "id": "82eaed5d", "metadata": { "deletable": false, "editable": false diff --git a/p9/README.md b/p9/README.md index 545fcb9..6b3612b 100644 --- a/p9/README.md +++ b/p9/README.md @@ -3,7 +3,7 @@ ## Corrections and clarifications: -* None yet. +* **(11/1/2023) - 7:00 PM**: Bug in `public_tests.py` that caused Q2 and Q9 to sometimes give the wrong output has been fixed. Please redownload `public_tests.py` if the earlier file caused any issues with those questions. **Find any issues?** Report to us: diff --git a/p9/p9.ipynb b/p9/p9.ipynb index a660827..bf19fcb 100644 --- a/p9/p9.ipynb +++ b/p9/p9.ipynb @@ -3,7 +3,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b849d066", + "id": "ce20f450", "metadata": { "cell_type": "code", "deletable": false, @@ -23,10 +23,10 @@ "metadata": { "editable": false, "execution": { - "iopub.execute_input": "2023-11-01T02:40:34.185013Z", - "iopub.status.busy": "2023-11-01T02:40:34.184012Z", - "iopub.status.idle": "2023-11-01T02:40:36.841336Z", - "shell.execute_reply": "2023-11-01T02:40:36.840326Z" + "iopub.execute_input": "2023-11-01T23:52:50.028049Z", + "iopub.status.busy": "2023-11-01T23:52:50.028049Z", + "iopub.status.idle": "2023-11-01T23:52:52.646262Z", + "shell.execute_reply": "2023-11-01T23:52:52.645036Z" } }, "outputs": [], @@ -40,10 +40,10 @@ "id": "7c321eb1", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:36.845357Z", - "iopub.status.busy": "2023-11-01T02:40:36.845357Z", - "iopub.status.idle": "2023-11-01T02:40:36.850211Z", - "shell.execute_reply": "2023-11-01T02:40:36.849200Z" + "iopub.execute_input": "2023-11-01T23:52:52.650263Z", + "iopub.status.busy": "2023-11-01T23:52:52.650263Z", + "iopub.status.idle": "2023-11-01T23:52:52.655448Z", + "shell.execute_reply": "2023-11-01T23:52:52.654417Z" } }, "outputs": [], @@ -199,10 +199,10 @@ "id": "9bc58344", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:36.855228Z", - "iopub.status.busy": "2023-11-01T02:40:36.855228Z", - "iopub.status.idle": "2023-11-01T02:40:36.997489Z", - "shell.execute_reply": "2023-11-01T02:40:36.996482Z" + "iopub.execute_input": "2023-11-01T23:52:52.661434Z", + "iopub.status.busy": "2023-11-01T23:52:52.660439Z", + "iopub.status.idle": "2023-11-01T23:52:52.853415Z", + "shell.execute_reply": "2023-11-01T23:52:52.852405Z" }, "tags": [] }, @@ -242,10 +242,10 @@ "id": "f8a88445", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:37.002490Z", - "iopub.status.busy": "2023-11-01T02:40:37.001490Z", - "iopub.status.idle": "2023-11-01T02:40:37.014622Z", - "shell.execute_reply": "2023-11-01T02:40:37.013614Z" + "iopub.execute_input": "2023-11-01T23:52:52.859416Z", + "iopub.status.busy": "2023-11-01T23:52:52.858419Z", + "iopub.status.idle": "2023-11-01T23:52:52.872312Z", + "shell.execute_reply": "2023-11-01T23:52:52.871300Z" }, "tags": [] }, @@ -273,10 +273,10 @@ "id": "a7914c33", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:37.018622Z", - "iopub.status.busy": "2023-11-01T02:40:37.018622Z", - "iopub.status.idle": "2023-11-01T02:40:39.005877Z", - "shell.execute_reply": "2023-11-01T02:40:39.004868Z" + "iopub.execute_input": "2023-11-01T23:52:52.878312Z", + "iopub.status.busy": "2023-11-01T23:52:52.877313Z", + "iopub.status.idle": "2023-11-01T23:52:54.797927Z", + "shell.execute_reply": "2023-11-01T23:52:54.796918Z" }, "tags": [] }, @@ -330,10 +330,10 @@ "id": "041c9914", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:39.010879Z", - "iopub.status.busy": "2023-11-01T02:40:39.009878Z", - "iopub.status.idle": "2023-11-01T02:40:39.019158Z", - "shell.execute_reply": "2023-11-01T02:40:39.018132Z" + "iopub.execute_input": "2023-11-01T23:52:54.802981Z", + "iopub.status.busy": "2023-11-01T23:52:54.801979Z", + "iopub.status.idle": "2023-11-01T23:52:54.811556Z", + "shell.execute_reply": "2023-11-01T23:52:54.810547Z" }, "tags": [] }, @@ -360,10 +360,10 @@ "id": "e149aea7", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:39.023170Z", - "iopub.status.busy": "2023-11-01T02:40:39.023170Z", - "iopub.status.idle": "2023-11-01T02:40:39.030207Z", - "shell.execute_reply": "2023-11-01T02:40:39.029199Z" + "iopub.execute_input": "2023-11-01T23:52:54.815559Z", + "iopub.status.busy": "2023-11-01T23:52:54.815559Z", + "iopub.status.idle": "2023-11-01T23:52:54.822997Z", + "shell.execute_reply": "2023-11-01T23:52:54.821986Z" } }, "outputs": [], @@ -424,10 +424,10 @@ "id": "c3589ac0", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:39.034208Z", - "iopub.status.busy": "2023-11-01T02:40:39.034208Z", - "iopub.status.idle": "2023-11-01T02:40:39.130911Z", - "shell.execute_reply": "2023-11-01T02:40:39.130911Z" + "iopub.execute_input": "2023-11-01T23:52:54.827203Z", + "iopub.status.busy": "2023-11-01T23:52:54.827203Z", + "iopub.status.idle": "2023-11-01T23:52:54.928728Z", + "shell.execute_reply": "2023-11-01T23:52:54.927719Z" }, "tags": [] }, @@ -439,7 +439,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6a26dee9", + "id": "6f8f870d", "metadata": { "deletable": false, "editable": false @@ -470,10 +470,10 @@ "id": "75341871", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:39.178226Z", - "iopub.status.busy": "2023-11-01T02:40:39.178226Z", - "iopub.status.idle": "2023-11-01T02:40:39.272819Z", - "shell.execute_reply": "2023-11-01T02:40:39.271808Z" + "iopub.execute_input": "2023-11-01T23:52:54.975632Z", + "iopub.status.busy": "2023-11-01T23:52:54.975632Z", + "iopub.status.idle": "2023-11-01T23:52:55.078224Z", + "shell.execute_reply": "2023-11-01T23:52:55.077214Z" }, "tags": [] }, @@ -485,7 +485,7 @@ { "cell_type": "code", "execution_count": null, - "id": "0a05260a", + "id": "3166a7f4", "metadata": { "deletable": false, "editable": false @@ -598,10 +598,10 @@ "id": "daf0903f", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:39.343601Z", - "iopub.status.busy": "2023-11-01T02:40:39.343601Z", - "iopub.status.idle": "2023-11-01T02:40:39.352533Z", - "shell.execute_reply": "2023-11-01T02:40:39.351516Z" + "iopub.execute_input": "2023-11-01T23:52:55.131634Z", + "iopub.status.busy": "2023-11-01T23:52:55.131634Z", + "iopub.status.idle": "2023-11-01T23:52:55.139551Z", + "shell.execute_reply": "2023-11-01T23:52:55.138526Z" }, "tags": [] }, @@ -620,7 +620,7 @@ { "cell_type": "code", "execution_count": null, - "id": "d50a71f1", + "id": "0b779bfd", "metadata": { "deletable": false, "editable": false @@ -647,10 +647,10 @@ "id": "ce300935", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:39.412379Z", - "iopub.status.busy": "2023-11-01T02:40:39.411377Z", - "iopub.status.idle": "2023-11-01T02:40:40.010252Z", - "shell.execute_reply": "2023-11-01T02:40:40.009233Z" + "iopub.execute_input": "2023-11-01T23:52:55.181482Z", + "iopub.status.busy": "2023-11-01T23:52:55.180463Z", + "iopub.status.idle": "2023-11-01T23:52:55.704861Z", + "shell.execute_reply": "2023-11-01T23:52:55.703844Z" }, "tags": [] }, @@ -671,7 +671,7 @@ { "cell_type": "code", "execution_count": null, - "id": "e8d710a0", + "id": "261ee8f6", "metadata": { "deletable": false, "editable": false @@ -684,7 +684,7 @@ { "cell_type": "code", "execution_count": null, - "id": "afd82c51", + "id": "61527acd", "metadata": { "deletable": false, "editable": false @@ -697,7 +697,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9f35a7e2", + "id": "1fa60948", "metadata": { "deletable": false, "editable": false @@ -710,7 +710,7 @@ { "cell_type": "code", "execution_count": null, - "id": "02294604", + "id": "6a68a8f8", "metadata": { "deletable": false, "editable": false @@ -752,10 +752,10 @@ "id": "0b7a9fdc", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:40.103413Z", - "iopub.status.busy": "2023-11-01T02:40:40.103413Z", - "iopub.status.idle": "2023-11-01T02:40:40.115032Z", - "shell.execute_reply": "2023-11-01T02:40:40.115032Z" + "iopub.execute_input": "2023-11-01T23:52:55.789076Z", + "iopub.status.busy": "2023-11-01T23:52:55.789076Z", + "iopub.status.idle": "2023-11-01T23:52:55.802890Z", + "shell.execute_reply": "2023-11-01T23:52:55.801861Z" }, "tags": [] }, @@ -767,7 +767,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f17e8f12", + "id": "ba8dc097", "metadata": { "deletable": false, "editable": false @@ -796,10 +796,10 @@ "id": "dfecaff8", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:40.140209Z", - "iopub.status.busy": "2023-11-01T02:40:40.139208Z", - "iopub.status.idle": "2023-11-01T02:40:40.146545Z", - "shell.execute_reply": "2023-11-01T02:40:40.146431Z" + "iopub.execute_input": "2023-11-01T23:52:55.827635Z", + "iopub.status.busy": "2023-11-01T23:52:55.827635Z", + "iopub.status.idle": "2023-11-01T23:52:55.834299Z", + "shell.execute_reply": "2023-11-01T23:52:55.834299Z" }, "tags": [] }, @@ -812,7 +812,7 @@ { "cell_type": "code", "execution_count": null, - "id": "b350e8ee", + "id": "a617b893", "metadata": { "deletable": false, "editable": false @@ -861,10 +861,10 @@ "id": "711540ef", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:40.187972Z", - "iopub.status.busy": "2023-11-01T02:40:40.187972Z", - "iopub.status.idle": "2023-11-01T02:40:41.486105Z", - "shell.execute_reply": "2023-11-01T02:40:41.485095Z" + "iopub.execute_input": "2023-11-01T23:52:55.875309Z", + "iopub.status.busy": "2023-11-01T23:52:55.875309Z", + "iopub.status.idle": "2023-11-01T23:52:57.151059Z", + "shell.execute_reply": "2023-11-01T23:52:57.150050Z" }, "tags": [] }, @@ -892,10 +892,10 @@ "id": "243a1082", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:41.490105Z", - "iopub.status.busy": "2023-11-01T02:40:41.489104Z", - "iopub.status.idle": "2023-11-01T02:40:41.494489Z", - "shell.execute_reply": "2023-11-01T02:40:41.493483Z" + "iopub.execute_input": "2023-11-01T23:52:57.155063Z", + "iopub.status.busy": "2023-11-01T23:52:57.154070Z", + "iopub.status.idle": "2023-11-01T23:52:57.158867Z", + "shell.execute_reply": "2023-11-01T23:52:57.158452Z" } }, "outputs": [], @@ -927,10 +927,10 @@ "id": "d6a7c7bb", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:41.498492Z", - "iopub.status.busy": "2023-11-01T02:40:41.497491Z", - "iopub.status.idle": "2023-11-01T02:40:41.505072Z", - "shell.execute_reply": "2023-11-01T02:40:41.505072Z" + "iopub.execute_input": "2023-11-01T23:52:57.162886Z", + "iopub.status.busy": "2023-11-01T23:52:57.162886Z", + "iopub.status.idle": "2023-11-01T23:52:57.170422Z", + "shell.execute_reply": "2023-11-01T23:52:57.169775Z" }, "tags": [] }, @@ -943,7 +943,7 @@ { "cell_type": "code", "execution_count": null, - "id": "503cb3a5", + "id": "3af2cc03", "metadata": { "deletable": false, "editable": false @@ -992,10 +992,10 @@ "id": "f32adf53", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:41.547777Z", - "iopub.status.busy": "2023-11-01T02:40:41.547777Z", - "iopub.status.idle": "2023-11-01T02:40:41.800645Z", - "shell.execute_reply": "2023-11-01T02:40:41.799632Z" + "iopub.execute_input": "2023-11-01T23:52:57.213610Z", + "iopub.status.busy": "2023-11-01T23:52:57.213610Z", + "iopub.status.idle": "2023-11-01T23:52:57.471533Z", + "shell.execute_reply": "2023-11-01T23:52:57.470503Z" }, "tags": [] }, @@ -1021,10 +1021,10 @@ "id": "074435e5", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:41.805662Z", - "iopub.status.busy": "2023-11-01T02:40:41.804662Z", - "iopub.status.idle": "2023-11-01T02:40:41.810435Z", - "shell.execute_reply": "2023-11-01T02:40:41.809415Z" + "iopub.execute_input": "2023-11-01T23:52:57.475533Z", + "iopub.status.busy": "2023-11-01T23:52:57.475533Z", + "iopub.status.idle": "2023-11-01T23:52:57.480037Z", + "shell.execute_reply": "2023-11-01T23:52:57.479023Z" } }, "outputs": [], @@ -1069,10 +1069,10 @@ "id": "52e0d794", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:41.815446Z", - "iopub.status.busy": "2023-11-01T02:40:41.815446Z", - "iopub.status.idle": "2023-11-01T02:40:41.827471Z", - "shell.execute_reply": "2023-11-01T02:40:41.826459Z" + "iopub.execute_input": "2023-11-01T23:52:57.484038Z", + "iopub.status.busy": "2023-11-01T23:52:57.484038Z", + "iopub.status.idle": "2023-11-01T23:52:57.494987Z", + "shell.execute_reply": "2023-11-01T23:52:57.493977Z" }, "tags": [] }, @@ -1085,7 +1085,7 @@ { "cell_type": "code", "execution_count": null, - "id": "64cc7015", + "id": "30c9530e", "metadata": { "deletable": false, "editable": false @@ -1134,10 +1134,10 @@ "id": "bcade1a3", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:41.876888Z", - "iopub.status.busy": "2023-11-01T02:40:41.875892Z", - "iopub.status.idle": "2023-11-01T02:40:42.243856Z", - "shell.execute_reply": "2023-11-01T02:40:42.242837Z" + "iopub.execute_input": "2023-11-01T23:52:57.535731Z", + "iopub.status.busy": "2023-11-01T23:52:57.535731Z", + "iopub.status.idle": "2023-11-01T23:52:57.853180Z", + "shell.execute_reply": "2023-11-01T23:52:57.852171Z" }, "tags": [] }, @@ -1163,10 +1163,10 @@ "id": "46933f0e", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.248849Z", - "iopub.status.busy": "2023-11-01T02:40:42.248849Z", - "iopub.status.idle": "2023-11-01T02:40:42.254491Z", - "shell.execute_reply": "2023-11-01T02:40:42.253574Z" + "iopub.execute_input": "2023-11-01T23:52:57.857425Z", + "iopub.status.busy": "2023-11-01T23:52:57.857425Z", + "iopub.status.idle": "2023-11-01T23:52:57.862407Z", + "shell.execute_reply": "2023-11-01T23:52:57.861396Z" } }, "outputs": [], @@ -1194,10 +1194,10 @@ "id": "d24531e5", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.259753Z", - "iopub.status.busy": "2023-11-01T02:40:42.259753Z", - "iopub.status.idle": "2023-11-01T02:40:42.269668Z", - "shell.execute_reply": "2023-11-01T02:40:42.268651Z" + "iopub.execute_input": "2023-11-01T23:52:57.866406Z", + "iopub.status.busy": "2023-11-01T23:52:57.866406Z", + "iopub.status.idle": "2023-11-01T23:52:57.875793Z", + "shell.execute_reply": "2023-11-01T23:52:57.874705Z" }, "tags": [] }, @@ -1210,7 +1210,7 @@ { "cell_type": "code", "execution_count": null, - "id": "ff7f4adb", + "id": "a83312ab", "metadata": { "deletable": false, "editable": false @@ -1259,10 +1259,10 @@ "id": "647677f0", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.323176Z", - "iopub.status.busy": "2023-11-01T02:40:42.323176Z", - "iopub.status.idle": "2023-11-01T02:40:42.600756Z", - "shell.execute_reply": "2023-11-01T02:40:42.599747Z" + "iopub.execute_input": "2023-11-01T23:52:57.917274Z", + "iopub.status.busy": "2023-11-01T23:52:57.917274Z", + "iopub.status.idle": "2023-11-01T23:52:58.185671Z", + "shell.execute_reply": "2023-11-01T23:52:58.184653Z" }, "tags": [] }, @@ -1290,10 +1290,10 @@ "id": "415c7847", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.605756Z", - "iopub.status.busy": "2023-11-01T02:40:42.604777Z", - "iopub.status.idle": "2023-11-01T02:40:42.611553Z", - "shell.execute_reply": "2023-11-01T02:40:42.610544Z" + "iopub.execute_input": "2023-11-01T23:52:58.189901Z", + "iopub.status.busy": "2023-11-01T23:52:58.188888Z", + "iopub.status.idle": "2023-11-01T23:52:58.194316Z", + "shell.execute_reply": "2023-11-01T23:52:58.193299Z" } }, "outputs": [], @@ -1334,10 +1334,10 @@ "id": "b6d49c68", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.616762Z", - "iopub.status.busy": "2023-11-01T02:40:42.615552Z", - "iopub.status.idle": "2023-11-01T02:40:42.624728Z", - "shell.execute_reply": "2023-11-01T02:40:42.623719Z" + "iopub.execute_input": "2023-11-01T23:52:58.199553Z", + "iopub.status.busy": "2023-11-01T23:52:58.198552Z", + "iopub.status.idle": "2023-11-01T23:52:58.206056Z", + "shell.execute_reply": "2023-11-01T23:52:58.205895Z" }, "tags": [] }, @@ -1349,7 +1349,7 @@ { "cell_type": "code", "execution_count": null, - "id": "30899418", + "id": "2b1fb3f1", "metadata": { "deletable": false, "editable": false @@ -1378,10 +1378,10 @@ "id": "352bc7cb", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.671079Z", - "iopub.status.busy": "2023-11-01T02:40:42.670080Z", - "iopub.status.idle": "2023-11-01T02:40:42.682389Z", - "shell.execute_reply": "2023-11-01T02:40:42.681380Z" + "iopub.execute_input": "2023-11-01T23:52:58.248601Z", + "iopub.status.busy": "2023-11-01T23:52:58.248601Z", + "iopub.status.idle": "2023-11-01T23:52:58.259092Z", + "shell.execute_reply": "2023-11-01T23:52:58.259092Z" }, "tags": [] }, @@ -1393,7 +1393,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9c15ffbb", + "id": "cb5a87c9", "metadata": { "deletable": false, "editable": false @@ -1420,10 +1420,10 @@ "id": "9b8c6227", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.727562Z", - "iopub.status.busy": "2023-11-01T02:40:42.726555Z", - "iopub.status.idle": "2023-11-01T02:40:42.732061Z", - "shell.execute_reply": "2023-11-01T02:40:42.731052Z" + "iopub.execute_input": "2023-11-01T23:52:58.304517Z", + "iopub.status.busy": "2023-11-01T23:52:58.303499Z", + "iopub.status.idle": "2023-11-01T23:52:58.308956Z", + "shell.execute_reply": "2023-11-01T23:52:58.307911Z" } }, "outputs": [], @@ -1438,10 +1438,10 @@ "id": "6e830024", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.736082Z", - "iopub.status.busy": "2023-11-01T02:40:42.735068Z", - "iopub.status.idle": "2023-11-01T02:40:42.829361Z", - "shell.execute_reply": "2023-11-01T02:40:42.828316Z" + "iopub.execute_input": "2023-11-01T23:52:58.312937Z", + "iopub.status.busy": "2023-11-01T23:52:58.312937Z", + "iopub.status.idle": "2023-11-01T23:52:58.405996Z", + "shell.execute_reply": "2023-11-01T23:52:58.404988Z" } }, "outputs": [], @@ -1498,10 +1498,10 @@ "id": "68a86136", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:42.833374Z", - "iopub.status.busy": "2023-11-01T02:40:42.832385Z", - "iopub.status.idle": "2023-11-01T02:40:42.993489Z", - "shell.execute_reply": "2023-11-01T02:40:42.992474Z" + "iopub.execute_input": "2023-11-01T23:52:58.410187Z", + "iopub.status.busy": "2023-11-01T23:52:58.410187Z", + "iopub.status.idle": "2023-11-01T23:52:58.586322Z", + "shell.execute_reply": "2023-11-01T23:52:58.585102Z" }, "tags": [] }, @@ -1513,7 +1513,7 @@ { "cell_type": "code", "execution_count": null, - "id": "336c8dea", + "id": "35791dd8", "metadata": { "deletable": false, "editable": false @@ -1540,10 +1540,10 @@ "id": "9236b2b3", "metadata": { "execution": { - "iopub.execute_input": "2023-11-01T02:40:43.043535Z", - "iopub.status.busy": "2023-11-01T02:40:43.042533Z", - "iopub.status.idle": "2023-11-01T02:40:43.046848Z", - "shell.execute_reply": "2023-11-01T02:40:43.046608Z" + "iopub.execute_input": "2023-11-01T23:52:58.640111Z", + "iopub.status.busy": "2023-11-01T23:52:58.639110Z", + "iopub.status.idle": "2023-11-01T23:52:58.644701Z", + "shell.execute_reply": "2023-11-01T23:52:58.643692Z" } }, "outputs": [], @@ -1555,7 +1555,7 @@ { "cell_type": "code", "execution_count": null, - "id": "f66b1d9d", + "id": "09fefa8d", "metadata": { "deletable": false, "editable": false @@ -1568,7 +1568,7 @@ { "cell_type": "code", "execution_count": null, - "id": "91f400ac", + "id": "1fe8799f", "metadata": { "deletable": false, "editable": false @@ -1580,7 +1580,7 @@ }, { "cell_type": "markdown", - "id": "38c30ff8", + "id": "b8eb4b5e", "metadata": { "deletable": false, "editable": false @@ -1603,7 +1603,7 @@ { "cell_type": "code", "execution_count": null, - "id": "6bab4703", + "id": "20ff6b83", "metadata": { "cell_type": "code", "deletable": false, @@ -1619,7 +1619,7 @@ { "cell_type": "code", "execution_count": null, - "id": "65688b66", + "id": "52971fd7", "metadata": { "cell_type": "code", "deletable": false, @@ -1633,7 +1633,7 @@ { "cell_type": "code", "execution_count": null, - "id": "9367ff2e", + "id": "4ded66e4", "metadata": { "cell_type": "code", "deletable": false, @@ -1647,7 +1647,7 @@ }, { "cell_type": "markdown", - "id": "33eb2209", + "id": "234ad183", "metadata": { "deletable": false, "editable": false diff --git a/p9/public_tests.py b/p9/public_tests.py index ebaba0b..1901b8d 100644 --- a/p9/public_tests.py +++ b/p9/public_tests.py @@ -530,8 +530,10 @@ def simple_compare(expected, actual, complete_msg=True): msg = "expected %s but found %s" % (expected.__name__, actual.__name__) else: msg = "expected %s but found %s" % (expected.__name__, repr(actual)) - elif not isinstance(actual, type(expected)) and not (isinstance(expected, (float, int)) and isinstance(actual, (float, int))): - msg = "expected to find type %s but found type %s" % (type(expected).__name__, type(actual).__name__) + elif not isinstance(actual, type(expected)): + if not (isinstance(expected, (float, int)) and isinstance(actual, (float, int))): + if not is_namedtuple(expected): + msg = "expected to find type %s but found type %s" % (type(expected).__name__, type(actual).__name__) elif isinstance(expected, float): if not math.isclose(actual, expected, rel_tol=REL_TOL, abs_tol=ABS_TOL): msg = print_message(expected, actual, complete_msg) @@ -547,7 +549,7 @@ def simple_compare(expected, actual, complete_msg=True): new_msg = print_message(expected, actual, complete_msg) if len(expected) != len(actual): return new_msg - val = simple_compare(list(expected.keys()), list(actual.keys())) + val = list_compare_unordered(list(expected.keys()), list(actual.keys())) if val != PASS: return new_msg for key in expected: @@ -805,7 +807,7 @@ def namedtuple_compare(expected, actual): """namedtuple_compare(expected, actual) is used to compare when the expected answer is a namedtuple defined in the test file.""" msg = PASS - if is_namedtuple(actual, False): + if not is_namedtuple(actual, False): msg = "expected namedtuple but found %s" % (type(actual).__name__) return msg if type(expected).__name__ != type(actual).__name__: @@ -1116,7 +1118,7 @@ def check(qnum, actual): expected = _expected_json[qnum] if SLASHES in q_format: - q_format = q_format.replace(SLASHES, "") + q_format = q_format.replace(SLASHES, "").strip("_ ") expected = clean_slashes(expected) actual = clean_slashes(actual) -- GitLab