CS 221 Fall 2011 - Grading Sheet for Problem Set 2
Due: 23:59:59 Friday, October 21
The purpose of this assignment is to reinforce the concepts of MATLAB
programming, including loops. Parts of the text relevant to this
assignment are Chapter 3 and Chapter 4.
This assignment has three parts; you will submit a single "zip"
archive containing your answers to all three parts. This archive
should contain five files in all: divalg.m,
loop.m, grades.m,
hypot.m and sections.m.)
Late Submission Penalties
Late submissions will be penalized 20% per day or fraction of
day. Thus if you submit at 8:00 a.m. Saturday, the maximum score you
can get will be 80. If you submit at 1:00 a.m. Sunday, your max score
will be 60.
General Policies
Because we have around 180 submissions to grade, it is important that
you follow the instructions about what to submit and
how to format it. (Note: 15 minutes grading time for each of 180
submissions = 45 hours.)
-
Failure to include directory in zip file: 10% penalty.
-
Sending one or more files in some format other than .m: 15% penalty.
-
Missing files for some parts: no points for that part.
Note that you can submit an assignment to CS Portal more than once,
but your submission should contain all files in a single archive. If
you submit more than once, only the last submission will be scored.
Part 1: Implementing an algorithm with a while-loop
20 points for this problem. Deductions for:
-
Wrong boolean expression for while (5 points off)
-
Missing update for one or both of the remainder and quotient variables (-10)
-
fprintf has wrong formatting string or no formatting string (-5)
-
Formatting issues, output not suppressed or other minor issues (-2)
Part 2: Using for-loops in MATLAB
Problem 1: 20 points total. Deductions for:
-
Problems with creating the array of random numbers or with the
initialization of the minimum, maximum, or sum. (5 points off)
-
Generated random integers instead of floating point numbers, or
generated numbers for an incorrect range. (-2)
-
Problems with the for loop or how it was indexed. (-5)
-
Problems with how minimum, maximum, sum, or mean was calculated,
including the incorrect use of if statements where
needed. (-5)
-
fprintf has wrong formatting string or no formatting string.
-
Formatting issues, output not suppressed or other minor issues (-2)
Problem 2: 20 points total. Deductions for:
-
Wrong indexing in for loop (-5)
-
No gradesEquivalent array but somehow showed the output (-2)
-
Semicolon behind if-else statement (-5)
-
Missing if-else statement (-10)
-
Wrong or complicated boolean expression in if-else (-5)
-
Missing output for grades equivalent (-5)
-
Formatting issues, output not suppressed or other minor issues (-2)
Problem 3: 15 points total. Deductions for:
-
Code not properly formatted as a function with two parameters for
input and returning an array as output. (-5)
-
Wrong indexing or other problems with for loop. (-5)
-
Incorrect formula for calculation of hypotenuse of a right triangle. (-5)
-
Formatting issues, output not suppressed or other minor issues (-2)
Part 3: Accessing Sections of Arrays
25 points for this problem: 4 points for item 1, 2.5 points each for
items 2-3, and 4 points each for items 4-7.