Format for Required Laboratory Write-ups
## Format for Required Laboratory Write-ups

CSC 151 requires students to turn in various laboratory exercises. While
the first required lab (exercise 3) has special expectations, write-ups for
all subsequent laboratory exercises should utilize the following formatting
conventions:
Answers to all required parts should be typed.

The lab write-up should begin with the names and mailboxes of the students
in the group, followed by the number and title of the exercise.

Answers to questions should appear in numerical order (e.g., answer to
question 1, then answer to question 2, then answer to question 3, etc.).

While there is no need to repeat the question from a lab, each answer
should be clearly numbered; the write-up should make clear which answer
goes with what question.

Comments, observations, and explanations should be written as Scheme
comments (with lines starting with semicolons).

Code should be written clearly and ready to run.

Sample tests and test results should be given for each required piece of
code.

### Example:

The following is a possible write-up for question 8 of
lab 2.
`
;;; Henry M. Walker
;;; Box Science II
;;; Sample Lab 2: Format for Required Laboratory Write-ups
;;; Step 8
(modulo (truncate 12345.6789) 10)
;; returns 5.0, because
;; (truncate 12345.6789) removes digits to the right of the decimal
;; point -- yielding 12345.0 -- and
;; (modulo 12345.0 10) gives the remainder when dividing 12345.0 by 10
(modulo (truncate (/ 12345.6789 10)) 10)
;; returns 4.0, because
;; (/ 12345.6789 10) shifts the decimal point left one place
;; giving 1234.56789
;; (truncate (/ 12345.6789 10)) or (truncate 1234.56789) removes
;; digits to the right of the decimal place -- giving 1234.0
;; (modulo 1234.0 10) gives the remainder when dividing 1234.0 by 10
;; To extract the thousands digit of 12345.6789, first move the decimal
;; point to immediately after the 2, truncate, and look at a remainder:
(modulo (truncate (/ 12345.6789 1000)) 10)
`

This document is available on the World Wide Web as

http://www.math.grin.edu/~walker/courses/151.fa00/lab-format.html

*created January 28, 1999*

*last revised August 26, 2000*

Henry M. Walker
(walker@cs.grinnell.edu)