Homework Policy

The Boring But Important Details

There will be a total of ten homework assignments in CS 307. Homework assignments are administered through PrairieLearn. These homework assignments will serve as practice for the quizzes.

To access the course’s PrairieLearn content, simply navigate to prairielearn.org and add the Fall 2024 version of the course.

Question Types

Questions on homework assignments will take one of four possible forms:

  • Checkbox questions will present a series of statements and students will be asked to check a box for each “correct” statement. These questions generally attempt to assess conceptual understanding.

  • Numeric questions will ask students to input one or more numeric quantities.1 These questions generally attempt to assess mathematical understanding.

  • Code questions will ask students to submit Python code to be graded. These questions generally attempt to assess algorithmic understanding.

  • Model Fitting questions will ask students a learned model for grading. These questions generally attempt to assess applied understanding.

Grading and Deadlines

Homework assignments in CS 307 are low-stakes, unlimited attempt assessments. That is, there is no penalty for submitting incorrect answers, and your score can only go up, never down.

Timeout

All questions on homework assignments will have a one minute timeout between possible submissions. This timeout serves a number of purposes. For checkbox questions, it should deter you from simply attempting to brute force a solution. For numeric questions it should encourage you to check your work before submission. For code questions, it should encourage to test your functions yourself before submitting. For model fitting questions, it should encourage you to do your own validation before submit.

In short, the timeout exists to encourage good habits. Or said another way, the timeout exists to prevent you from developing bad habits.

Partial Credit

Partial credit is available for most questions.

  • For partial credit on checkbox style questions, each individual checkbox provides \(1 / n\) points where there are \(n\) checkboxes total for the question. For each checkbox, you obtain \(1 / n\) points if you check the box correctly, or if you leave the box unchecked correctly.

  • For numeric questions that require multiple inputs, partial credit is based mostly on which inputs you supply correctly.

  • For code questions, submitted code will be checked against several distinct test cases, each providing some amount of credit.

  • For model fitting questions, submitted models will be compared to thresholds for various metrics and partial credit will be aware based on some function of distance from stated threshold.

Each of the above partial credit styles are better learned through practice. Be sure to complete Homework 00!

Buffer Points and Multiple Deadlines

No homework assignments will be dropped. Instead, there will be opportunity to earn buffer points with each homework.2 Buffer points will allow you to obtain over 100% for a particular assignment, but your overall homework average cannot exceed 100%.3 To allow for buffer points, each assignments will have multiple deadlines, for differing credit.

The buffer point and submission deadline details can be seen in the details of each quiz on PrairieLearn. As an example, consider Homework 01:

  • 105% Credit: Monday, September 9, 11:59 PM
  • 100% Credit: Monday, September 16, 11:59 PM
  • 75% Credit: Monday, September 23, 11:59 PM

To obtain the 105% buffer credit, you must achieve a raw score of 100% before the deadline for 105% credit.4 For homework deadlines, we will generally refer to the date to obtain 105% credit in causal conversation, but don’t forget the additional deadlines!

Python

You are allowed to and expected to use Python to solve many homework problems.

Rounding and Precision

Do not round any intermediate calculations. More generally, unless explicitly asked to, you should never round any calculations in CS 307. When submitting answers to numeric questions, copy-paste all digits reported by Python. Do not attempt to change the default number of digits that Python displays. If for some reason you feel that you have the correct answer, but it is not being accepted by the autograder due to a precision issue, please alert the course staff. Again, do not modify the number of digits that Python displays.

When Python prints a number, it is often only showing you some of the precision that it has stored.

import numpy as np
print(np.pi)
3.141592653589793

Obviously, we know that \(\pi\) has many more digits than this. Are these all the digits Python uses when you use np.pi for a calculation? Nope! It is just the digits that Python displays by default, many more digits are in some sense stored.

print(f"{np.pi:.25f}")
3.1415926535897931159979635

However, interestingly, for many applications, only a few digits of \(\pi\) will get the job done!

Note that, because of this, you should never copy-paste Python output then re-paste it into a script. Doing so will cause you to accidentally lose precision!

As an aside, working with numbers in computers is, difficult.

0.1 + 0.2 == 0.3
False
0.1 + 0.2
0.30000000000000004

The above results are unfortunate, but not surprising. They are simply a consequence of floating point arithmetic. For more:

As student in CS 307, this is not something you actually need to worry about. But it does serve as a reminder to Dave that he needs to use np.allclose instead of np.array_equal to make comparisons in the autograder.

VSCode Workspaces

You may complete homework assignments by using Python however you like. Mostly, we recommend VSCode on your own machine and the setup that we have described in the Computing Setup Guide.

However, because quizzes will be completed in the CBTF, you will only have access to VSCode, and thus Jupyter notebooks, through PrairieLearn to complete your quizzes. Thus, it would be a good idea to practice using VSCode through PrairieLearn for some of your homework assignments.

The first question of each homework will serve to provide a VSCode workspace. Within the workspace, you will be given a Jupyter Notebook named homework-xx.ipynb in the left panel. This notebook will contain any definitions, formulas, etc, that you are not expected to memorize. Use this notebook for any Python coding need to complete checkbox, numeric, or code questions.

When you open a notebook in VSCode on PrairieLearn, the correct Python kernel should be preselected for you. If instead you see the “Select Kernel” button, click it and you should only see one kernel available, which you should select.

As you practice using VSCode through PrairieLearn, please pay close attention to the available keyboard shortcuts. For docstring access, use ?. For example, place ?np.mean in a cell in a notebook and run that cell.

Model fitting questions will have a workspace specific to those questions.

Footnotes

  1. See the note below about rounding answers. TLDR: Never round anything.↩︎

  2. These buffer points are not extra credit. They function slightly differently.↩︎

  3. See the Syllabus for additional details on grading calculations.↩︎

  4. Unfortunately, the 105% credit cannot be given on a per-question basis. So instead, once you answer everything correctly, your score jumps from 100% to 105%.↩︎