The projects will very in size a whole lot. This one is very small.  

Project 1

 

 
Topic: Introduction. Expressions and Values in general, and in Scheme.  

Review

None; this is the first lesson.

But I will use this space to say that the fuscia colored words are vocabulary that you need to learn, so watch out for them.

Concepts

Computer Science is the study of computation.

Computation is performed by a lot of things. Things in society and things in nature.

And yes, computation is also done by the machines we call "computers".

Computer scientists are fond of saying that Computer Science is not about computers.

There's some truth to that.

Computer Science is a mathematical discipline, and a design discipline, and probably other things too.

In Computer Science, we study computation, and we write programs.

I believe that everyone should learn to design programs.

Years ago, a "computer" was a person who could do computations by hand accurately and efficiently.

Performing computations by hand is a very great art. To swipe a line from Mark Twain, the rumors of the demise of hand computation are greatly exaggerated.

But in this course we're going to use a tool, called a programming language, to help us do computation, and more importantly, to help us think about computation. Our programming language is called Scheme.

What is computation...

To do a computation is to find a new value by performing operations on data.

Here is more about operations. Read it when you need it.

A computer program is a series of operations that is stored in the computer, and can be used in different situations.

Information expressed in a programming language is called data.

The first kind of data we will discuss will be numbers (There will be many kinds of data.)

Generally, we think of a value as the result of a computation.

In other words, when we are doing a computation, and we get a value, we stop computing.

For example, 37 is a value.

There are many kinds of values besides numbers, and we will learn about several of them.

We call the signs and names we use to represent operations operators.Our operators are sometimes signs, like + * - / , and are sometimes words or abbreviations, like square or sqrt.Operators work on values. The values are called its operands-- "operand" means: the thing being operated on.

One important point is the value of an operand in an expression... can also be an expression!

So.... (+ 2 2) is an expression.... but so is (+ (+ 2 2) (+ 3 3))....

Expressions tell how to find a certain value. Here is more detail about expressions in general.

Here are several examples of Scheme expressions, and the equivalent algebraic expression:

Numerical Scheme Expressions (prefix)
The same expression in infix notation:
71 71 -- this is a simple expression.
1/3 1/3
(+ 2 5) 2+5
(* 10 x) 10x ---note use of implied multiplication
(+ 5 (* 10 x)) 5 + 10x ---first multiply then add
(* (+ 5 10) x) (5+ 10 )x --- first add then multiply
(/ 10 5) 10/5 -- order of the operands is just the same.
(- x 1) x-1
(/ (- x 1) 5) (x-1)/5
(/ (* (+ d (* c (+ a b))) e) (- f g)) ( c(a +b) + d) e / (f - g) -- just to see a fancier one

Here is some more detail about expressions in Scheme. Read it when you need to.

In-Class Activity

Pencil only on ALL tests and hand-written assignments in CS.

First, in your notebook, with your warmups and notes, write down the vocabulary list (all the words in fuscia). No, don't copy definitons.

Here are 15 descriptions of numeric expressions. For each of these descriptions of an expression, you need to

  1. A number with no decimals.
  2. A number with 1 decimal place.
  3. A number with 15 decimal places
  4. A negative number.
  5. A number in scientific notation, using engineering exponents (1.25e10). This means 1.25 x 10^10.
  6. pi (literally "pi" in lowercase letters)
  7. A fraction using the slash.
  8. A negative fraction.
  9. A fraction that is not in lowest terms.
  10. An improper fraction.
  11. An expression with addition.
  12. An expression with addition and multiplication, with the addition performed first.
  13. An expression with addition and multiplication, with the multiplication performed first
  14. An expression with subtraction and multiplication
  15. An expression with 3 operations.

What to do next: This one was short. Go to the next project immediately.

index....glossary.....