CSC 151 Grinnell College Fall, 2005
Fundamentals of Computer Science I

Format for Required Laboratory Write-ups

CSC 151 requires students to turn in various laboratory exercises. The write-ups for these laboratory exercises should utilize the following formatting conventions:


The following is a possible write-up for a lab which contained these exercises:

;;; Henry M. Walker
;;; Box Y-02
;;; Sample Lab 1:  Format for Required Laboratory Write-ups

;;; Exercise 1

(cons 'one (cons 'two (cons 'three (cons 'four '()))))

;; testing:

;> (cons 'one (cons 'two (cons 'three (cons 'four '())))) 
;    ===> (one two three four)

;;Exercise 2
(cons 'one (cons (cons 'two (cons 'three '())) (cons 'four '())))
;; testing:

;> (cons 'one (cons (cons 'two (cons 'three '())) (cons 'four '())))
;    ===> (one (two three) four)

;; Exercise 3
(cons (cons (cons 'one '()) '()) '())

;; testing:

;this expression generated the desired result

;;; Exercise 4

;The cons procedure is commonly used to insert an additional element 
;at the head of a list.  In this exercise, A is a value and ls is a 
;list of n elements.  Thus, (cons A ls) creates a list of n+1 
;elements:  A is first on this new list, with the elements of ls 
Alternatively, in place of the testing components above, you could include the output from the Interpretation window of Dr. Scheme (but be sure that the output you turn in corresponds exactly to your code).

This document is available on the World Wide Web as

created 28 January 1999
last revised 21 August 2005

Henry M. Walker (