Functional Problem Solving (CSC 151 2015F) : Outlines

Outline 03: An Introduction to Scheme


Held: Tuesday, 1 September 2015

Back to Outline 02 - An Introduction to Linux. On to Outline 04 - Computing with Symbols and Numbers.

Summary

Today we begin your exploration of the Scheme programming language and the environment in which you will be devleoping algorithms in Scheme.

Related Pages

Overview

Administrivia

Upcoming Work

Extra Credit Opportunities

Academic

Peer Support

Leftover Questions on Algorithms

Thanks very much to the students who provided these questions!

Can you give an example of a subroutine from the nut butter and preserve algorithm?

Sure. There was an "open a jar" algorithm that I could have applied to both the nut butter jar and the preserve jar. Given that the preserve jar is glass, I don't think it would have been a good idea to use the "hit the top of the jar on the counter" algorithm. Here's an alternative. (Yes, you can probably find flaws.)

To open a jar

  1. grasp the body of the jar with your non-dominant hand holding the top of the jar upward.

  2. grasp the lid of the jar with your dominant hand

  3. if the jar appears to be a screw-top jar, rotate the lid of the jar counter-clockwise while continuing to hold the bottom steady. Keep rotating the lid counter-clockwise until it separates from the jar.

  4. if the jar appears to be a pop-top jar, pull the lid upward, applying force at the edge of the lid while holding the body of the jar steady

  5. if the jar appears to be neither a screw-top jar nor a pop-top jar, report an inability to open the jar and stop.

Can you give examples of the where parts of an algorithm appear in the nut butter and preserve algorithm?

Lab

The Need for Formality

A Short History of Scheme

Scheme Basics

Some Procedures You Should Know