Homework Four: MyPython 1.1 -- Completing the
Expression Language and Adding Function
Definitions
General Homework Policies for CS 320
Please provide answers to these problems by filling in this notebook and submitting it via websubmit by
Tuesday 2/20 by midnight. If the lab for this week involved a separate notebook, it is due at the same time. For
any problems involving diagrams or drawings, you may try your hand at ASCII art or you may submit an
electronic version of your drawings, either using drawing software or by scanning or photographing hand
drawings. A message has been posted to Piazza showing you how to automatically include these in your
notebook (a nice touch). Make sure in the latter case that the result is legible; if we can not understand your
drawing, it will receive no credit.
There is a grace period, longer than 15 minutes but shorter than a couple of hours, after the deadlines, to
account for temporarily problems with submission (dropped connections etc.). In cases where I have uploaded
a solution late on Wednesday night (probably close to the 15 minute mark!) no submissions will be accepted
after the solution is uploaded.
You may submit by Wednesday midnight for a 10% penalty; after that no credit will be given.
I will drop the lowest homework/lab combination at the end of the term.
For coding problems any reasonable solution, in which you understand the spirit of the exercise and try to learn
this week's material through your efforts, will be graded based solely on the test cases. In general, shortcuts to
avoid learning the material will be unreasonable. For example, you may not use any Python libraries or functions
that make your task dramatically easier (e.g., you may use split(), replace(...), int(...), and float(...), as mentioned
below, and any other normal functions, but may NOT use the Python library for regular expressions). Good
Python style, using list comprehensions, Numpy, creating helper functions in addition to what is required, etc.,
when appropriate, are quite reasonable! Check with me if you have questions about this.
Lab problems may be worked on collaboratively at the lab and afterwards, with no need to indicate whom you
collaborated with. (Of course, if you simply copy, then you will not learn what you need for homeworks and
tests, and your grade will reflect your lack of effort.)
Homework problems must be solved individually, and will be subject to the College rules on plagiarism. In
particular, you are absolutely forbidden to copy code or answers from another student or from a source
other than my slides and materials I provide to you. We will run the code from notebooks through an
electronic service that checks for plagiarism, and any violation will be dealt with harshly, up to and including an
automatic drop of one letter grade at the end of the term (this policy will be familiar to those who took CS 111 at
BU). Significant offences will be referred to the College Academic Misconduct Committee. These policies are
necessary to provide a fair environment for you to do your best work with the expectation that the quality and
quantity of your efforts will be rewarded appropriately. Please take this as seriously as I do.
Make sure to click Cell -> Run All before submitting notebooks!!