CS - PowerPoint PPT Presentation

About This Presentation
Title:

CS

Description:

Start early; give yourself time for mistakes. Hey, can I still pass. if I can get enough ... DYLAN DYNACE E ECLIPSE Eiffel EGG ELF ELASTIC C ELLIE EMERALD ... – PowerPoint PPT presentation

Number of Views:254
Avg rating:3.0/5.0
Slides: 116
Provided by: ccGa
Category:
Tags: elf | yourself

less

Transcript and Presenter's Notes

Title: CS


1
1321
  • CS

2
CS1321Introduction to Programming
  • Georgia Institute of Technology
  • College of Computing
  • Lecture 1
  • Aug. 21, 2001
  • Fall Semester

3
Who I am
Who Monica Sweat Email sweat_at_cc.gatech.edu
(use cs1321 in the subject line) (avoid sending
me html-formatted email!) Office Room 120,
College of Computing. Course http//www.cc.gatec
h.edu/classes/AY2002/cs1321 My website
http//www.cc.gatech.edu/sweat Office hours
TBA
4
University Vocabulary
  • Lecture Typically led by Professor or Lecturer.
    Sometimes big.
  • Lab Formerly held in equipped laboratory. Now
    hands on labs are done on your own.
  • Recitation Typically led by Teaching Assistant
    (TA). Smaller group. Questions and answers.

5
Basic Schedule
Lecture Tues Thurs (1.5 hours each) You
MUST go to the section youve signed up for For
example, the homeworks might vary from section to
section. Recitation One night/week 600 p.m.
to 800 p.m.
6
Resources
  • Book DrScheme Website
  • How To Design Programs
  • Felleisen, Findler, Flatt, Krishnamurthi
  • http//www.htdp.org
  • Class Web Site
  • http//www.cc.gatech.edu/AY2002/CS1321
  • Lecture slides
  • Examples
  • On-line Lab Manual
  • And much more

7
Resources
  • Newsgroups required reading!
  • My Web Site
  • http//www.cc.gatech.edu/sweat
  • Lecture slides
  • Examples
  • And much more
  • Again, DrScheme Web Site
  • http//www.htdp.org

8
Course Text
How to Design Programs Matthias Felleisen
Robert Bruce Findler Matthew Flatt Shriram
Krishnamurthi ISBN 0-262-06218-6 Online copy
available at http//www.htdp.org
9
Help
  • Follow the following sequence of people
  • TA (or newsgroup)
  • Senior TA (STA) your TA's supervisor
  • Instructor/Program Manager

10
Graded items
  • Tests given during recitation, dates TBA
  • Final exam consult OSCAR for estimated date
    time, but subject to change!
  • Homework many. 2-day and 5 day turnaround.
    Basically assigned one lecture, due the next.
  • Lab - Weekly often simple.
  • Note Done on your own the name lab is a
    misnomer and is misleading.

11
Course Grading Breakdown
Evaluation (no curve) Test 33 Hw
20 Lab 15 Final 30 BB 2
12
Some Tips
  • For many students this will be your first
    exposure to Computer Science (unlike Math,
    Chemistry, etc.)

13
Tip 1
Dont wait until the last minute to get help
14
Tip 2
Hey, can I still pass if I can get enough partial
credit?
Bad things happen while learning a new skill.
You will probably crash and burn on some
programs. Start early give yourself time for
mistakes.
15
Tip 3
Dont be too ambitious with your course load.
You CANNOT slack off in this class, even for a
few days.
16
Tip 4
Watch out for the big picture. Dont forget
this is a programming course, not a Scheme
course. Its dangerous to hide from the
programming part of the course. You may be
crushed on the final.
17
Todays Menu
0. What is Computer Science? 1. What is an
Algorithm? 2. Why Study Computer Science? 3.
Which Computer Language? 4. Why Scheme? 5.
Course Mechanics 6. On to Scheme
18
0. What is Computer Science?
19
Many possible answers...
languages
hardware
algorithms
from different perspectives
20
Definitions
Computer science is the study of what computers
do.
21
Rather Dry Definition
Computer science, today more accurately a
separate discipline, considers a number of rather
mathematical topics. In addition to computability
questions arising from many problems in discrete
mathematics, and logic questions related to
recursion theory, one must consider scheduling
questions, stochastic models, and so on.
Computer Science is no more about computers
than astronomy is about telescopes.
22
Definitions
"Computer Science is, simply put, the study of
computation. The study of anything that lends
itself to a computational model is a study in
Computer Science."
23
Definitions
Computer science revolves around computational
processes, which are also called information
processes or simply processes. A process is a
dynamic succession of eventsa happening.
24
ProcessWhat?
?
So we define CS based on a study of
computational processes--- Whats a
process?
25
A Definition Through Indirection
Another way of describing a process is "a
procedure in execution." A procedure is a
collection of instructions, that results in some
useful behavior on behalf of the device that
executes the instruction. When expressed in a
symbolic language, the procedure is called a
computer program.
What's a procedure?
26
1. What is an Algorithm?
27
Algorithms
  • An algorithm is a precise method of solving a
    problem
  • A given problem may be solvable by a number of
    different algorithms
  • An algorithm will typically use levels of
    abstraction to make the solution clearer and
    implementation easier.

28
Once upon a time
  • Many years ago programmers realized that
    programming a complex task would be simpler if
    they could break the big job down into pieces

29
Once upon a time
  • This was the birth of modular programming where
    big programs get broken down into smaller pieces
    called modules, methods, subroutines, procedures
    or functions.

30
Abstraction
  • Breaking down a problem into components that
    finally just do one thing is called abstraction.

31
Algorithms Abstraction
  • A key feature of a well written algorithm will be
    proper use of abstraction
  • This will provide an algorithm that
  • is more understandable
  • is easier to implement and test
  • provides more reusable modules
  • will get a higher grade!

A
32
2. Why Study Computer Science?
33
Myth
Computer science is for techno geeks who want to
drive expensive luxury imports.
34
Imagine
Taking a class about bicycling And never getting
on a bike! So we propose to you, to spend some
cycles learning about computer programming Will
you be ready for the Tour de France?
35
The Inevitable...
If we propose to study CS, we need the
convenience of a symbolic language to express and
communicate our instructions. Hence, well use
a computer language to learn about processes and
procedures.
36
3. Which Computer Language?
37
Flavors
A ABC ABEL ABCL ACCENT ACTOR ADA ADL AGORA AKL
ALEF ALEPH ALF ALGOL ALLOY AMBER AMIGA E AML AMPL
appall AVAIL AWK B BABEL BASIC BAWK BeBOP BEFUNGE
BETA BEGL BERTRAND BIGWIG BISTRO BLISS BLUE
BRIAN BRILLIANT BSL C C C C C (GNU CECIL
CHARITY CHEETAH CHiLL CILK CLAIRE CLARITY CLEAN
CLIPS CLOS CLU COBOL COLD FUSION COMAL COMMON
LISP COOL COMPONENT PASCAL CORAL COQ CORBA COSY
CWEB DAD DARK BASIC DELPHI DEMETER DIALECT
DRAGOON DYLAN DYNACE E ECLIPSE Eiffel EGG ELF
ELASTIC C ELLIE EMERALD ENIAC ERLANG ESCHER
EuLISP EUPHORIA FRANZ LISP FMPL FORMS/3 FORTH
FORTRAN G GEL GENTLE GNU E GDEL GREEN GUILE
HASKELL HOPE HPCODE HUGO ICI ICON INFER ISWIM J
JADE JAVA JAVA BEANS JAVASCRIPT JoCAML JOY JUICE
K KALEIDOSCOPE KEVO LAGOONA LAMINA LAURE LEDA
LENS LIANA LIFE LIMBO LINDA LIS LISP LML LOGO
LOOEE LOOKS LORE LPC LUA LUSTRE M4 MAGENTA MAGMA
MATCHMAKER MATLAB MCPL MELD MELD C MENTAT MERCURY
MEROON MIRANDA MISA ML MODULA 2 MODULA 3 MOPS
MOZART MUMPS NAPIER 88 NAWK NEON NESL NET REXX
NEWTON NIAL O2 OAKLISP OBERON OBJ OBJECTIVE C
OBJECTIVE CAML OBJECT OBLIQ OCCAM OCTAVE OLABL
OMEGA ONTIC OPAL ORCA OSCAR OSQL OZ PAL PARASOL
PARLOG PASCAL PERL PECOS PFL PHOCUS PHANTOM PHP
PICO PICT PIKE PILE PIRANHA PIRL PIZZA PL/B PL/I
PLANKALKUL PLAIN PLIANT POLKA POLYGOTH PRESTO
PROGRESS POOL POP POPTALK POSTSCRIPT POWERBUILDER
PROBE PROFAN PROGRAPH PROLOG PROMETHEUS PROTEUS
PY PYTHON Q QUEST R REBOL REFINE REGINA RELFUN
REXX RPG RUBY S SAS SATHER SCALLOP SCHEME
SCREAMER SCRIPT X SED SEL SELF SEQUENCE L SEPIA
SIMULA SINA SIRI SISAL SMALLTALK SMSL SNAML
SNOBOL SNOOPS SPANNER SQUEAK SQL SR SUNEIDO T3X
Tcl/TK TECO TELESCRIPT TELOS TEMPO THETA TOM TOP
TRAITS TRELLIS TURBO PASCAL TURING TYCOON UFO
UNLAMBDA V VIRT VISUAL BASIC VISUAL BASICSCRIPT
VISUAL C WINDUCTOR WINTERP WOOL XLISP XML YAFL
YERK YORICK Z ZPL ZUSE XSCHEME
Assembler, C, C, Fortran, Java, Scheme, Lisp
38
?
Whats the purpose of a computer language?
39
Consider
To understand why there are so many computer
languages, we might also consider why there are
many spoken languages. Exactly how many
spoken languages are there?
40
Consider
Total Living Languages Percentage The
Americas 1,000 15 Africa 2,011 30 Europ
e 225 3 Asia 2,165 32 The
Pacific 1,302 19 ------ TOTAL 6,703
Source www.sil.org/ethnologue
41
Insight
We have so many spoken languages because there
are so many cultures and contexts for
societies. Similarly, there are many different
computer languages because they each come from
unique contexts, and address different types of
problems and needs.
42
Asked Another Way
Why are there so many computer languages? (Why
not create one perfect computer language?) For
whom does one write programs in a language? (Why
not write them in 1s and 0s?)
?
43
Typically
  • Different types of problems lead to different
    approaches with computer languages
  • Scientific computation - Fortran
  • List processing - Lisp
  • Business programming - Cobol
  • Systems programming - C
  • Old CS education favorite Pascal
  • Object-Oriented programming C
  • OOP thats good for running over internet - Java

44
Computer Languages
Computer languages have two related
purposes efficiently provide instructions to
machines that execute programs and
procedures provide a clear written record of
the theory or idea expressed in the
procedure
1.
Computer consumption
2.
Human consumption
45
Computer Languages
We could program in 1s and 0s (machine language),
but will instead employ a high-level language.
Were using a language called Scheme, plus
introducing some basic software tools (Matlab,
Excel, HTML, etc.) But note that -- what you
learn is not restricted to the language --
ideas expressed in the language can be
expressed in other languages
46
Revelation
We are therefore writing programs in Scheme (and
not 1s and 0s that the computers prefer)
because. . .
... we want other people to understand our ideas
and programs. In other words, computer
languages are used to communicate with OTHER
PEOPLE (as well as computers).
47
Note!
This is not a class in Scheme programming This
is a class about computation and problem
solving. Its just handy to actually use a
programming language while we study the subject
at hand programming and problem solving.
Scheme is "incidental but essential" to the
course subject. Were more concerned about
programming.
48
4. Why Scheme?
49
Scheme?
The choice of Scheme for beginners is
natural. Permits programmers to focus on two key
elements of programming Programs as relations
between quantities Evaluating programs for
specific inputs. Using just this core language,
students can develop complete programs during the
first session with a teacher.
50
Scheme?
The choice of Scheme for beginners is
natural. Easily arranged as a tower of language
levels. As students learn more about programming
and the language, the teacher can expose students
to richer layers of the language, which allows
students to write more interesting and more
concise programs.
51
Scheme?
The choice of Scheme for beginners is
natural. The DrScheme programming environment
offers a truly interactive evaluator.
Definitions window where students define
programs Interactions window which acts like a
pocket calculator. You can enter expressions
into the interactions window, and DrScheme
determines their values (just like with
pocket-calculator arithmetic). You proceed from
there to calculations with structures, lists, and
trees--the kinds of data that computer programs
often manipulate.
52
Scheme?
The choice of Scheme for beginners is
natural. Use of an interactive evaluator with a
rich data language permits you to focus on
problem solving and program design activities.
An interactive mode of evaluation encourages
you to experiment in all kinds of ways and
satisfy your curiosity!
53
Scheme?
The choice of Scheme for beginners is
natural. The nature of Scheme requires
programmers to use good abstraction to solve a
problem. Many computer scientists consider
learning a functional language like Scheme to be
an essential part of learning the process of
abstraction.
54
But we wanted to use a cool real-world language!!!
55
Real World Use of Scheme
Scheme is used! -- NASAs 1999 Software of the
Year was a Lisp program controlling the Deep
Space 1 spacecraft. -- Powers parts of Yahoos
backend -- CAD software engines used Lisp --
Its used by professionally trained software
engineers
56
Why Use Scheme?
Core Material at other Universities Berkeley
Brown CMU Indiana MIT Rice
Utah Yale
Florida
57
Why Use Scheme?
Speed -- Rapid prototyping -- Development
time (more expensive than
execution time) is quicker
58
Why Use Scheme?
Speed (contd) -- Scheme (derived from Lisp)
has an execution time that well to many other
fast languages We have repeated Prechelt's
study using Lisp as the implementation language.
Our results show that Lisp's performance is
comparable to or better than C in terms of
execution speed, with significantly lower
variability which translates into reduced project
risk. Furthermore, development time is
significantly lower and less variable than either
C or Java. NASA study of Lisp www-aig.jpl.n
asa.gov/public/home/gat/lisp-study.html
59
Why Use Scheme?
Cost Free!
Money allocated for an expensive C
compiler can now be squandered elsewhere.
60
  • SCHEME is a statically scoped and properly
    tail-recursive dialect of the LISP programming
    language invented by Guy Lewis Steele Jr. and
    Gerald Jay Sussman. It was designed to have an
    exceptionally clear and simple semantics and few
    different ways to form expressions. A wide
    variety of programming paradigms, including
    imperative, functional, and message passing
    style, find convenient expression in SCHEME.
  • SCHEME has lexical scoping, uniform evaluation
    rules, and uniform treatment of data types. It
    does not have the concept of pointers,
    uninitialized variables, specialized looping
    constructs, or explicit storage management. In
    SCHEME all data types are equal. What one can do
    to one data type, one can do to all data types.
    There are seven kinds of expressions constant,
    variable reference, procedure creation, procedure
    application, conditional, assignment, and
    sequence.
  • Numbers are especially interesting in that an
    integer is a rational and a real is a complex.
    SCHEME requires no looping constructs. Any
    function which calls itself in the "Tail"
    position is just a loop.
  • SCHEME has several important advantages it's
    elegantly simple in that regular structure and
    trivial syntax avoids "special case" confusion.
    It's expressiveness means that one spends little
    time trying to work around the language, it
    concentrates on what they want say rather than on
    how to say it. It supports a variety of styles
    (including OO) allows users to better match
    their solution style to the style of the problems
    to be solved.

Theres Much, Much More...
61
Scheme is cool
62
Finally
63
Ga Tech Experience
  • Monolingual programmers are not well equipped for
    the real world

64
Tough Nut to Crack
Java
Scheme
CS COMPUTATION
C
C
65
6. On to Scheme
)
66
6. On to Scheme
)))))))
67
6. On to Scheme
))))))))))))))))))))))))))))))))))))))))))))))))))
)))))))))) )))))))))))))))))))))))))))))))))))))))
))))))))))))))))))))) ))))))))))))))))))))))))))))
)))))))))))))))))))))))))))))))) )))))))))))))))))
))))))))))))))))))))))))))))))))))))))))))) ))))))
))))))))))))))))))))))))))))))))))))))))))))))))))
)))) )))))))))))))))))))))))))))))))))))))))))))))
))))))))))))))) ))))))))))))))))))))))))))))))))))
)))))))))))))))))))))))))) )))))))))))))))))))))))
))))))))))))))))))))))))))))))))))))) ))))))))))))
)))))))))))))))))))))))))))))))))))))))))))))))) )
))))))))))))))))))))))))))))))))))))))))))))))))))
))))))))) ))))))))))))))))))))))))))))))))))))))))
)))))))))))))))))))) )))))))))))))))))))))))))))))
))))))))))))))))))))))))))))))) ))))))))))))))))))
)))))))))))))))))))))))))))))))))))))))))) )))))))
))))))))))))))))))))))))))))))))))))))))))))))))))
)))
68
Installing Dr. Scheme
http//www.htdp.org
69
In cs1321, you will use the DrScheme program as
your editor and development environment
70
Definitions Window
Interactions Window
71
Execute buttons loads the Definitions into
the Interactions window
72
Saving your work
73
Important
Be sure to set the language level in Dr. Scheme
to Beginning Scheme, then click on "Execute
74
Perspective
We might categorize computer languages
procedural or imperative languages
-- BASIC, FORTRAN, C, Pascal -- Reflect
low-level focus of language -- Programmers must
create solutions that reflect the type of
hardware, restrictions and limits of the system
they are using
75
Perspective
Object-oriented programming
-- Java, C, Ada, Smalltalk -- Programmers must
think in terms of data and the behaviors
appropriate to that data -- Less design pressure
from the limits and requirements of the computer
system.
76
Perspective
Functional Programming
-- Lisp, Scheme -- Programs viewed as a
collection of procedures similar to mathematical
functions. -- Much easier to implement
77
Further Perspective
In addition to labels of functional, procedural,
and OO languages, we might also categorize
languages based on whether they are interpreted
or compiled (or even a hybrid). Interpreted
languages are evaluated one step at a time, with
values and variables being determined dynamically
at run time. Compiled languages are assembled
into memory, with address locations and offsets
precalculated, and then crafted into an
executable program.
78
The Big Picture
Paradigm
Object Oriented
Imperative/ Procedural
Functional
Other
Interpreted
Scheme Lisp
Smalltalk
Basic
Prolog
Compiled
Fortran C, Ada
C
Hybrid
Java
79
So
  • Scheme can execute a single line of code as soon
    as it is typed into the interactions window
  • ( 2 2)
  • 4

80
Simple Evaluation
Lets start with something simple. Suppose we
wanted to solve the following expression 3
4 5 This looks easy, but what might go
wrong?
81
Simple Evaluation
It might be that by mistake someone could read
this as 7 5 by adding before multiplying. A
clear mistake. 3 4 5 How can we
be sure nobody makes this mistake?
82
Simple Evaluation
We can add unnecessary but helpful parentheses
around part of the expression. 3 (4
5) We all know that parenthetical expressions
are evaluated first So this will make it
totally clear.
83
Simple Evaluation
We can go further, and add parentheses around the
entire expression. (3 (4
5)) This doesnt change the meaning of our
original short notation. It makes things
explicit.
84
Did You Know?
As it turns out, the choice of representing
operators (, ) between the operands (numbers)
is completely arbitrary. (1 2)
Convention could be to write this as (
1 2) or even 1 2
Assuming binary operands, because of the way
postfix notation works, theres no need for a
set of parentheses
85
Prefix Notation
Scheme uses prefix notation, where the operation
call occurs first, followed by the data or
arguments.
( )
Examples ( 2 2) ( 3 1) (/ 10 0) ( 7 (
4 5))
Which of these would cause problems if entered
into a simple calculator?
86
Prefix Notation
Self quiz Write the following expression in
prefix notation 1) subtract 3 from 5 2)
subtract 10 from the quantity 5 minus 8 3)
divide 3 into 42 4) sum the squares of both 3
and 4
87
Using DrScheme
(in class demonstration)
88
Using the Stepper
DrScheme includes a remarkable stepping tool that
lets you see the order of evaluation. Lets
evaluate some complex expressions with this
tool. (/ ( 2 4) (/ ( 6 4) ( 12
4))) (in class demonstration)
89
Grading Notice
At this point, you might want to consult the
following grade-action chart
Desired Grade in cs1321
Actions You Will Take This Evening
Try numerous examples in DrScheme AND the
Stepper Run DrScheme, but not the
Stepper Merely read notes/slides Blow it off
until somethings due
A
B
C
D/F
90
Onto Functions
We noted that Scheme is a functional
programming language. This implies well be
working with functions. Lets review what we
knew about functions in mathematics.
91
Functions
Lets start with a simple function from
mathematics f(x) x x This function
squares a number, thus f(2) 2 2
4 f(5) 5 5 25

with me?
92
Functions
Recall that a function maps a set of values,
called the domain, onto a set of return
values, called the range, so that one of the
domain values is paired with one and only one of
the range values.
1
2
3
93
f(X)
f(X) XX
range
X
domain
94
Functional Vocabulary
Consider again
f(x) x x
95
Functional Vocabulary
f(x) x x f(2)
The function body is applied to the value 2
96
Observations
f(x) x x f(2) 4
Predictable, reproducible. Each time we apply
the function to the value 2, we get the same
result. Nothing changed about the parameter.
Each time we call f(2), we do not change the
value of 2. The function doesnt alter anything
in the world.
97
Observations
Composable. We can compose a function of other
functions. f(f(2)) The inner f(2) returns 4,
so the outer f() call is sent 4. The overall
expression returns 16 f(f(2)) ? f(4) ? 16
98
Basic Scheme
Having refreshed our memory of functions, lets
learn about a few basic Scheme data types.
99
Scheme
Elements
Integers, e.g. 4, -6, 0 Real Numbers, e.g.,
3.14159 Ratios, e.g., 1/2, 4/3 Symbols, e.g.,
x, y, foo, bar -- often used for the name of a
parameter, or a function name, or a variable
100
Scheme
Given what weve covered, how would you
categorize this

Is this a real number? An integer? A ratio?
Perhaps a symbol? Hmm
101
Scheme
Predefined symbols. As it turns out, there are
about 100 predefined symbols in scheme, including
the arithmetic operators
addition - subtraction
multiplication / division
102
Our First Example
Suppose we wished to use the predefined
function sqrt, which returns the square root of
a parameter. In the interpreter of DrScheme, you
might be tempted to type sqrt(4) Since were
used to expressions such as f(4) from
mathematics but Scheme uses a different style
103
Aha
As it turns out, in Scheme, you invoke functions
like so (sqrt 4) and not sqrt(4) Its
the same amount of typing the parens are in
different locations to clarify. (A more complex
example will show the merit of this.)
104
What if...
When we next type in (sqrt (sqrt 4)) we
see i1.4142135623730951 That looks like the
right value, but whats with the i in front?
This is schemes way of indicating an
approximation.
105
So let's write a Scheme function!
Remember square f(x) x x We start by naming
the function (define (sq x) and continue by
adding the body (define (sq x) ( x x)) And
we test (sq 3) 9
106
Remember Pythagoras?
107
And more...
c
b
a
c2 a2 b2 c sqrt(a2 b2)
108
And more...
(sqrt ( ( 3 3) ( 4 4))) 5
c
3
4
109
Recall
We use prefix notation, instead of infix ( 3
3) rather than ( 3 3) because scheme
expects the name of the function first (after the
opening paren). "" is a function that multiplies
numbers together
110
Repetition
(sqrt ( ( 3 3) ( 4 4)))
(sqrt ( ( 2 2) ( 8 8)))
c
2
8
If we had many triangles to work with, typing the
same expression over and over gets tedious.
111
A Fix
In mathematics, wed recognize the function at
play hypotenuse(a, b) sqrt ( aa bb
) Remember what that "" sign meant? It binds
the body to the function/parameter list. In
Scheme, we can do this binding by defining a
function. It begins with ( define
112
The Fix Is In
At this point, the Scheme interpreter would
expect you to name the function you hope to
define. We need to come up with a symbol
name. The symbol hypotenuse is
good (define (hypotenuse side1 side2) Here
side1 and side2 are "parameters" or "arguments
basically placeholders for the side lengths
113
Still More
At this point, weve have a symbol for the name
of the function and the names of the parameters
to the function.
(define (hypotenuse side1 side2)
The body of the function is easy to figure out
(define (hypotenuse side1 side2) (sqrt ( (
side1 side1) ( side2 side2))))
114
Style matters!(not to scheme, but for good
programming)
As a matter of style, we will use indents and
returns to better format the statement
(define (hypotenuse side1 side2)
(sqrt ( (
side1 side1) (
side2 side2)))) As opposed to (define
(hypotenuse side1 side2) (sqrt ( ( side1
side1) ( side2 side2))))
115
Can we abstract even further?
Note that we need to square the values and we
defined a square function sq earlier.
(define (hypotenuse side1 side2) (sqrt (
( side1 side1) ( side2 side2))))
(define (hypotenuse side1 side2) (sqrt (
(sq side1) (sq side2))))
116
Questions?
117
Reading Assignment
  • Read Chapter 1 from How to Design Programs!!
Write a Comment
User Comments (0)
About PowerShow.com