Fundamentals of Computer Science I (CSC-151.02 2000F)


Format for Lab Write-Ups

At times during this semester, I will ask you to write up your laboratory exercises. This document provides guidelines for laboratory writeups.

The writeup should be typed and saved as a .ss file. For example, you might save homework one as hw1.ss.

The writeup should begin with Scheme comments that give

You can often create your .ss file by starting with the log from a session (or from your definitions window), which you've saved as a text file. My teaching assistants and I will load the .ss file and execute it, comparing output as we go.

You should include sample output for any test expressions in your program. That sample output should be preceded by semicolons.

Example

For example, here is a sample resopnse to the second exercise in the procedure definitions lab.


;;; John Q. Student (Box 123) 
;;; Jane T. Student(Box 345)
;;; CSC151.02 Fall 2000
;;; Professor Rebelsky
;;; Laboratory definitions: User-Defined Procedures
;;; 8 September 2000
;;; Filename: polynomial.ss

;;; ==================================================
;;; Exercise 2: A Quadratic Polynomial
;;;
;;; poly1: compute the value of the function 5x^2 - 8x + 2
;;;
;;; Samuel A. Rebelsky
;;; Department of Mathematics and Computer Science
;;; Grinnell College
;;; rebelsky@cs.grinnell.edu
;;;
;;; Version of Monday, 4 September 2000
;;;
;;; Given:
;;;   x, an exact number
;;;
;;; Result:
;;;   result, an exact number
;;;
;;; Preconditions:
;;;   none
;;;
;;; Postconditions:
;;;   Returns the value of the polynomial 5x^2 - 8x + 2.
(define poly1
  (lambda (x)
    (+ (* 5 x x)
       (* -8 x)
       2
    )
  )
)

;;; Sample output
(poly1 0)
;;; Output: 2

(poly1 1)
;;; Output: -1

(poly1 2)
;;; Output: 6

(poly1 3)
;;; Output: 23

(poly1 4)
;;; Output: 50


Turning it in

You must drop your answer in the course dropbox at http://blackboard.grinnell.edu/bin/common/student_upload.pl?course_id=CSC151-02.

Here's how to use the dropbox:

History

Monday, 4 September 2000

Tuesday, 5 September 2000

Tuesday, 12 September 2000


Disclaimer Often, these pages were created "on the fly" with little, if any, proofreading. Any or all of the information on the pages may be incorrect. Please contact me if you notice errors.

This page may be found at http://www.cs.grinnell.edu/~rebelsky/Courses/CS151/2000F/Handouts/writeups.html

Source text last modified Wed Sep 13 10:46:29 2000.

This page generated on Wed Sep 13 10:46:39 2000 by Siteweaver. Validate this page's HTML.

Contact our webmaster at rebelsky@grinnell.edu