CS221 Homework Guidelines
Written assignments:
Homeworks should be written up clearly and succinctly; you may lose points if your answers are unclear or
unnecessarily complicated. Here's an
example of what we are looking for.
Written homework must be typeset using LaTeX, Microsoft Word, Pages for Mac, or an equivalent program,
and submitted as a PDF.
We strongly encourage you to use LaTeX: there are user-friendly web interfaces like
Overleaf.
See this
getting started guide.
Figures may be hand-drawn, so long as they are included in a typeset PDF.
If you're not sure where to start with formatting your written solutions, we recommend using
this template as a starting point. You can copy and paste its contents into an
Overleaf project or upload it directly.
Programming assignments:
The grader runs on Python 3.12, which is not guaranteed to work with alternative versions (e.g., Python 2.7).
Please use
Python 3.12 to develop your code.
The programming assignments are designed to be run
in GNU/Linux environments.
Most or all of the grading code may incidentally work on other
systems such as MacOS or Windows, and students may optionally
choose to do most of their development in one of these alternative
environments. However, no technical support will be provided for
issues that only arise on an alternative environment. Moreover,
no matter what environment is used during development, students
must confirm that their code (specifically, the student's submission.py
) runs on
Gradescope.
The submitted code will not be graded if it has one of the following issues:
- The original
grader.py
script (operating on the
submitted submission.py
) may not exit normally
if you use calls such as quit()
, exit()
,
sys.exit()
, and os._exit()
.
Also note that Python packages outside the standard library are not guaranteed to work. Therefore, do
not use packages like numpy, scikit-learn, and pandas.
- The code reads external resources other than the files given in the assignment.
- The code is malicious. This is considered a violation of the honor code. The score of the assignment
will be zero (0) and the incident will be reported to the Office of Judicial Affairs.
Electronic Submission:
All homework assignments are due at
11:59pm Pacific time
on the due date.
Assignments are submitted through
Gradescope. Do not
submit your assignment via email. If anything goes wrong, please ask a question on Ed or contact a course
assistant. You will be automatically enrolled in Gradescope using your @stanford.edu email address (email us
if that doesn't happen!). You can submit as many times as you'd like until the deadline: we will only grade
the last submission.
Submit early to make sure your submission runs properly on the Gradescope servers.
Gradescope will run
grader.py
on the programming questions and give you feedback on non-hidden
test cases.
You are responsible for checking that your program runs properly on these cases. You will not get credit
otherwise.
If anything goes wrong, please ask a question on Ed or contact a course assistant. Do not email us your
submission.
Partial work is better than not submitting any work.
For assignments with a programming component, we will automatically
sanity check your code in some basic test cases, but we will grade
your code on additional test cases.
Important: just because you pass the basic test cases, you are by no
means guaranteed to get full credit on the other, hidden test cases, so you should
test the program more thoroughly yourself!
Unless the assignment instructs otherwise, all of your code modifications
should be in submission.py
and all of your written answers
in <assignment ID>.pdf
. Upload the former to Gradescope
under the "Programming" section, and the latter under the "Written" section.
Late days:
A homework is $\lceil d \rceil$ days late if it is turned in $d$ days past the due date (note that this means if
you are $1$ second late, $\lceil d \rceil = 1$ and it is 1 day late).
You have
seven (7) late days
in total that can be distributed among the homeworks
without penalty. After that, the maximum possible grade is
decreased by 25% each day (so the best you
can do with $d = 1$ is 75%).
As an example, if you are out of late days and submit one day late, a 90 will be capped at a 75, but a 72 will
not be changed.
Note that we will only allow a max of $d = 2$ late days
per homework, though, so if $d > 2$ then we will
not accept your submission.
Gradescope is set up to accept written and programming submissions separately.
Late days are calculated per-assignment, with the number of late days used depending on the later submission.
So, if the programming part is $1$ day late and the written part is $2$ days late, then that will count as using
$2$ late days.
If you choose to do the project, please note that a late submission will count against your number of remaining late days.
Regrades: If you believe that the course
staff made an objective error in grading, then you may submit a
regrade request for the written part of your homework or exam. Remember
that even if the grading seems harsh to
you, the same rubric was used for everyone for fairness, so this
is not sufficient justification for a regrade.
It is also helpful to cross-check your answer against the released solutions.
If you still choose to submit a regrade request, click the corresponding
question on Gradescope, then click the "Request Regrade" button at the
bottom.
Any requests submitted over email or in person will be ignored. Regrade requests for a
particular assignment are due by Tuesday 11:59pm, one week after the
grades are returned. Note that we may regrade your entire submission,
so that depending on your submission you may actually lose more points
than you gain.