Com Sci 105
Fundamentals of Computer Programming
Autumn 1998

Programming Assignments

Programming Assignment 0
Due Monday 12 October, 11:59 PM

This assignment has no real programming content. It exercises you in the mechanics of writing and running Scheme programs, and handing in your work

Use MacGambit to type in the 4-line Pig Latin program in the example on page 10 of the textbook. See the instructions for creating and running programs for details. Try out the following uses of the pigl function:

  1. (pigl 'spaghetti)
  2. (pigl 'ok)
  3. (pigl 'Ypres)
  4. (every pigl '(the ballad of john and yoko))
  5. (every pigl '(Twas brillig and the slithy toves))
  6. (every pigl '('Twas brillig and the slithy toves))
  7. (every pigl '(Twas brillig, and the slithy toves))
  8. (pigl 'btfsplk)
At least one of these examples will cause an error that will leave the MacGambit interpreter in a funny state. Use the Top Level menu item to get back to the normal interpreter state. Think about the way in which text between parentheses in Scheme is not behaving like normal English text. The last example will cause MacGambit to run forever, doing nothing. We call this behavior an ``infinite loop.'' Use the Interrupt menu item to stop the loop.

Save your Pig Latin program in a file called ``pigl.sch'', and a transcript of your execution of the examples in a file called ``pigl.scr''. Put these two files in a folder with your last name and the assignment number. E.g., if your name is Duncan, call the folder ``Duncan 0''. Submit this folder in the drop box for your section of the class by 8:00 AM on Monday, 12 October. See the instructions for handing in assignments for details.

Modified instructions for handing in assignments

At the instructors' meeting on Monday, 5 October, we agreed on a general method for programming assignments, and a slightly odd arrangement for Assignment #0, since it is already in progress.

In general, assignments will be handed in online, plus a printed copy in class. The online hand-in is due at midnight at the end of a Sunday, and the printed copy can be handed in in class on the following Monday. The printed copy is for the convenience of the graders in making their comments. It should be a copy of the same material that you handed in online on the Sunday.

For assignment #0, we didn't want to upset anyone by moving the deadline earlier. So, assignment #0 online handin is due as posted at 11:59 PM on Monday 12 October. You may bring printed copy to class on Wednesday 14 October.

Warning: we expect to announce Assignment #1 on Monday 12 October, due at midnight on the end of Sunday 18 October, printed copy in class Monday 19 October.


Michael J. O'Donnell
Last modified: Thu Oct 8 20:58:12 CDT 1998