In addition to correctness, solutions will be graded for style and design. Detail is given below; but the quick list is
*
, +
, <
,
==
, &&
; for example x * y < a
,
not x*y<a
-x
and !
are not required
to have spaces
.
printResults(items, first, last, key)
# # Course: CS 2400 # Term: Spring 2020 # Assignment: assignment name # Author: your name #
BUFFER_SIZE = 50; // max items to process for ix in range(BUFFER_SIZE): print(ix)
@property
for
read-only attributes and make them protected (_x
) or
private (__x
). Particularly avoid global variables.
switch
statement in it, and even then the individual cases
should be just one or two lines long. If you can justify a longer method,
then
you are probably fine, but look closely for ways to break long sections
of code into smaller pieces. Comments and blank lines within
functions are counted.
distance += 10; # add ten to distanceare worse than useless - don't write a comment if its opposite is obviously false.
.py
" for file names. This causes problems for engineering
students. See
here
to enable showing extensions.