Code requirements
Project reports must satisfy all of the following requirements, which may evolve during the semester.
Python Code
Label | Requirement |
---|---|
P1 | Comments from the template code are almost never appropriate and should be replaced with your own comments. It is particularly inappropriate to retain comments like “This is my own script” in which the “my” refers to the person who created the template code and not to you. |
P2 | It must be possible to reproduce all of the results that you show in your report by running your notebook from start to finish (e.g., by selecting “clear all outputs,” then “restart,” then “run all”), exactly like the notebook provided with the example report. If the execution count (i.e., the numbers in brackets that appear just above each cell after it is run) in the notebook you submit is out of order or starts with a number other than “[1]”, then your notebook probably does not satisfy this requirement. |
P3 | There should be a markdown cell with documentation before each code cell. |
P4 | Template code should be removed if it not used. |
P5 | Template code to “plot the results” should be modified or entirely replaced. It is provided only as a starting point and creates plots that are, in general, not acceptable for use in your report (e.g., no care is taken to avoid covering plot lines with legends, variables in the legends are labeled with their python names and not with mathematical symbols, etc.). |
P6 | Comments must have a consistent style. For example, you should not switch between “# This style” and “# this style” (not capitalized) and “#This style” (no space after the pound sign). |
P7 | There must be no commented-out lines of code (unless these lines of code are part of a larger comment, most likely delimited by “"”triple quotes like this”””, that is meant to provide extra documentation and examples) — delete this old code instead. |
P8 | The notebook must not show any error or warning messages. Code that produces errors or warnings should either be fixed or deleted. |
P9 | Long code cells (more than a few lines) must be documented with comments — either single lines that begin with “#” or multiple lines that are enclosed by “"”triple quotes”””. |
P10 | Template headings (e.g., “Wheeled cat-catching robot”) must be replaced with your own headings. |
P11 | Documentation must not have typos — they give the impression that the code is unreliable. |
P12 | The HTML version of your code must be generated by following the instructions provided on the course website. |
P13 | You must submit only one jupyter notebook. If you used more than one notebook for development, then you must consolidate your code in a single notebook before submission. |