diff --git a/sum23/projects/p1/README.md b/sum23/projects/p1/README.md new file mode 100644 index 0000000000000000000000000000000000000000..78518df5c7f7438398215e2063fc17f94effe4c4 --- /dev/null +++ b/sum23/projects/p1/README.md @@ -0,0 +1,46 @@ +# Project 1 (P1) + +## Clarifications/Corrections + +None yet. + +**Find any issues?** Report to us: + +- Anna Meyer <apmeyer4@wisc.edu> +- Jane Zhang <zhang2752@wisc.edu> + +## Learning Objectives + +In this project, you will learn to: +* Run otter tests, +* Turn in your project using Gradescope. + +## Note on Academic Misconduct: +P1 is the first project of CS220, and is the **only** project where you are **not** allowed to partner with anyone else. You **must** work on this project by yourself, and turn in your submission individually. Now may be a good time to review our [course policies](https://canvas.wisc.edu/courses/355767/pages/syllabus). + +## Step 1: Setup + +You should have a folder `cs220` that you created for lab-p1 under `Documents`. We're assuming you did the lab and know how to do all the Tasks we mentioned. If you're confused about any of the following steps, refer back to your lab. + +#### Create a sub-folder called `p1` in your `cs220` folder +Refer to [Task 1.1](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab1#task-11-create-the-folders-for-this-lab) if you need help. + +This will store all your files related to P1. This way, you can keep files for different projects separate (you'll create a `p2` sub-folder for the next project and so on). Unfortunately, computers can crash and files can get accidentally deleted, so make sure you backup your work regularly (at a minimum, consider emailing yourself relevant files on occasion). + +#### Download `p1.ipynb` to your `p1` folder. +Refer to [Task 1.7](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab1#task-17-correctly-download-a-python-file) if you need help. + +#### Open a terminal in your `p1` folder. +Refer to [Task 1.3-1.5](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab1#task-13-open-a-terminal-emulator-aka-a-terminal). + +#### Run `p1.ipynb` code using jupyter notebook +Refer to [Task 4.1](https://git.doit.wisc.edu/cdis/cs/courses/cs220/cs220-lecture-material/-/tree/main/sum23/labs/lab1#task-13-open-a-terminal-emulator-aka-a-terminal). +Make sure to follow the directions provided in `p1.ipynb`. + +## Submission instructions +- Create a [Gradescope](https://www.gradescope.com/) login, if you haven't already created it. **You must use your wisc email to create the Gradescope login**. +- Login to [Gradescope](https://www.gradescope.com/courses/531688/) and join our course -- see [Canvas](https://canvas.wisc.edu/courses/355767/pages/week-1?module_item_id=6048037) for the access code +- In gradescope, upload the zip file into the P1 assignment. +- It is **your responsibility** to make sure that your project clears auto-grader tests on the Gradescope test system. Otter test results should be available in a few minutes after your submission. You should be able to see both PASS / FAIL results for the 2 test cases and your total score, which is accessible via Gradescope Dashboard (as in the image below): + + <img src="images/gradescope.png" width="400"> diff --git a/sum23/projects/p1/images/README.md b/sum23/projects/p1/images/README.md new file mode 100644 index 0000000000000000000000000000000000000000..0d6c72054c397299b2327866a2fb95d938c23a8e --- /dev/null +++ b/sum23/projects/p1/images/README.md @@ -0,0 +1,3 @@ +# Images + +Images from p1 are stored here. diff --git a/sum23/projects/p1/images/gradescope.png b/sum23/projects/p1/images/gradescope.png new file mode 100644 index 0000000000000000000000000000000000000000..a20e694efae8b4185cde369d77dd5ee138eaa30c Binary files /dev/null and b/sum23/projects/p1/images/gradescope.png differ diff --git a/sum23/projects/p1/p1.ipynb b/sum23/projects/p1/p1.ipynb new file mode 100644 index 0000000000000000000000000000000000000000..5a5549c02ec827c4e4806fcf0857021f63466743 --- /dev/null +++ b/sum23/projects/p1/p1.ipynb @@ -0,0 +1,237 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": null, + "id": "26245a58", + "metadata": { + "cell_type": "code", + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "# import and initialize otter\n", + "import otter\n", + "grader = otter.Notebook(\"p1.ipynb\")" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "c9a32093", + "metadata": { + "deletable": false + }, + "outputs": [], + "source": [ + "# PLEASE FILL IN THE DETAILS\n", + "# Enter none if you don't have a project partner\n", + "\n", + "# project: p1\n", + "# submitter: NETID1\n", + "# partner: none\n", + "# hours: ????" + ] + }, + { + "cell_type": "markdown", + "id": "9125244f", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 1:** \"Hello, World!\" program." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "aaf28663", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "name = \"World\"\n", + "greeting = \"Hello, \" + name + \"!\"\n", + "\n", + "greeting" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "b6a624b0", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q1\")" + ] + }, + { + "cell_type": "markdown", + "id": "e9cbc891", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "**Question 2:** Compute current year." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "34e3ebc7", + "metadata": { + "tags": [] + }, + "outputs": [], + "source": [ + "curr_year = 45 * 45 - 2\n", + "\n", + "curr_year" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "35fe8b4d", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "grader.check(\"q2\")" + ] + }, + { + "cell_type": "markdown", + "id": "21f45de4", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + "## Submission\n", + "Now, click on `Kernel` -> `Restart & Run All` to run all the cells in the notebook.\n", + "The cells below will automatically save your notebook after the previous cells are run, and generate a zip file for you to submit.\n", + "\n", + "**SUBMISSION INSTRUCTIONS**:\n", + "The zipfile automatically gets downloaded. You should have received a GradeScope invite - please accept it.\n", + "Login to GradeScope and upload the zipfile. Check otter results as soon as auto-grader gets completed." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "a6f723c8", + "metadata": { + "cell_type": "code", + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "# running this cell will create a new save checkpoint for your notebook\n", + "from IPython.display import display, Javascript\n", + "display(Javascript('IPython.notebook.save_checkpoint();'))" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "e12b2177", + "metadata": { + "deletable": false, + "editable": false + }, + "outputs": [], + "source": [ + "# Save your notebook first, then run this cell to export your submission.\n", + "grader.export(pdf=False, run_tests=True)" + ] + }, + { + "cell_type": "markdown", + "id": "1189b824", + "metadata": { + "deletable": false, + "editable": false + }, + "source": [ + " " + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.9.13" + }, + "otter": { + "OK_FORMAT": true, + "tests": { + "q1": { + "name": "q1", + "points": 12.5, + "suites": [ + { + "cases": [ + { + "code": ">>> greeting == \"Hello, World!\"\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + }, + "q2": { + "name": "q2", + "points": 12.5, + "suites": [ + { + "cases": [ + { + "code": ">>> curr_year == 2023\nTrue", + "hidden": false, + "locked": false + } + ], + "scored": true, + "setup": "", + "teardown": "", + "type": "doctest" + } + ] + } + } + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}