DOC PREVIEW
Berkeley COMPSCI 61A - Lecture 28

This preview shows page 1-2-3-4-5-6-45-46-47-48-49-50-51-92-93-94-95-96-97 out of 97 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 97 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

61A Lecture 28Friday, November 4Friday, November 4, 2011The Logo Programming Language2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programming2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programmingOne syntactic form for all purposes: invoking a procedure2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programmingOne syntactic form for all purposes: invoking a procedureOnly two data types: words and sentences2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programmingOne syntactic form for all purposes: invoking a procedureOnly two data types: words and sentencesCode is data: a line of code is a sentence2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programmingOne syntactic form for all purposes: invoking a procedureOnly two data types: words and sentencesCode is data: a line of code is a sentenceAn elegant tagline: no threshold, no ceiling2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programmingOne syntactic form for all purposes: invoking a procedureOnly two data types: words and sentencesCode is data: a line of code is a sentenceAn elegant tagline: no threshold, no ceilingA bit of fun: turtle graphics2Friday, November 4, 2011The Logo Programming LanguageA teaching language: designed for introductory programmingOne syntactic form for all purposes: invoking a procedureOnly two data types: words and sentencesCode is data: a line of code is a sentenceAn elegant tagline: no threshold, no ceilingA bit of fun: turtle graphics2DemoFriday, November 4, 2011Logo is a Dialect of Lisp3Friday, November 4, 2011Logo is a Dialect of LispWhat are people saying about Lisp?3Friday, November 4, 2011Logo is a Dialect of LispWhat are people saying about Lisp?•"The greatest single programming language ever designed." -Alan Kay (from the UI video), co-inventor of Smalltalk3Friday, November 4, 2011Logo is a Dialect of LispWhat are people saying about Lisp?•"The greatest single programming language ever designed." -Alan Kay (from the UI video), co-inventor of Smalltalk•"The only computer language that is beautiful." -Neal Stephenson, John's favorite sci-fi author3Friday, November 4, 2011Logo is a Dialect of LispWhat are people saying about Lisp?•"The greatest single programming language ever designed." -Alan Kay (from the UI video), co-inventor of Smalltalk•"The only computer language that is beautiful." -Neal Stephenson, John's favorite sci-fi author•"God's programming language." -Brian Harvey, Father of CS 61A3Friday, November 4, 2011http://imgs.xkcd.com/comics/lisp_cycles.pngLogo is a Dialect of LispWhat are people saying about Lisp?•"The greatest single programming language ever designed." -Alan Kay (from the UI video), co-inventor of Smalltalk•"The only computer language that is beautiful." -Neal Stephenson, John's favorite sci-fi author•"God's programming language." -Brian Harvey, Father of CS 61A3Friday, November 4, 2011Logo Fundamentals4Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spaces4Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions4Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions•A procedure takes inputs (arguments) that are values4Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions•A procedure takes inputs (arguments) that are values•A procedure returns an output (return value)4Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions•A procedure takes inputs (arguments) that are values•A procedure returns an output (return value)•A procedure may output None to indicate no return value4Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions•A procedure takes inputs (arguments) that are values•A procedure returns an output (return value)•A procedure may output None to indicate no return value4? print 55Friday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions•A procedure takes inputs (arguments) that are values•A procedure returns an output (return value)•A procedure may output None to indicate no return value4? print 55Multiple expressions can appear in a single lineFriday, November 4, 2011Logo FundamentalsCall expressions are delimited by spacesLogo procedures are equivalent to Python functions•A procedure takes inputs (arguments) that are values•A procedure returns an output (return value)•A procedure may output None to indicate no return value4? print 55Multiple expressions can appear in a single line? print 1 print 212Friday, November 4, 2011Nested Call Expressions5Friday, November 4, 2011Nested Call ExpressionsThe syntactic structure of expressions is determined by the number of arguments required by named procedures5Friday, November 4, 2011Nested Call ExpressionsThe syntactic structure of expressions is determined by the number of arguments required by named procedures5? print sum 10 difference 7 314Friday, November 4, 2011Nested Call ExpressionsThe syntactic structure of expressions is determined by the number of arguments required by named procedures5? print sum 10 difference 7 314print takes one argument (input)Friday, November 4, 2011Nested Call ExpressionsThe syntactic structure of expressions is determined by the number of arguments required by named procedures5? print sum 10 difference 7 314print takes one argument (input)sum takes two inputsFriday, November 4, 2011Nested Call ExpressionsThe syntactic structure of expressions is determined by the number of arguments required by named procedures5? print sum 10 difference 7 314print takes one argument (input)sum takes two inputsFriday, November 4, 2011Nested Call ExpressionsThe syntactic structure of expressions is determined by the number of arguments required by named procedures5? print sum 10 difference 7 314print takes one argument (input)sum takes two inputsdifference


View Full Document

Berkeley COMPSCI 61A - Lecture 28

Documents in this Course
Lecture 1

Lecture 1

68 pages

Midterm

Midterm

5 pages

Midterm

Midterm

6 pages

Lecture 35

Lecture 35

250 pages

Lecture 14

Lecture 14

125 pages

Lecture 2

Lecture 2

159 pages

Lecture 6

Lecture 6

113 pages

Lecture 3

Lecture 3

162 pages

Homework

Homework

25 pages

Lecture 13

Lecture 13

117 pages

Lecture 29

Lecture 29

104 pages

Lecture 11

Lecture 11

173 pages

Lecture 7

Lecture 7

104 pages

Midterm

Midterm

6 pages

Midterm

Midterm

6 pages

Lecture 8

Lecture 8

108 pages

Lab 4

Lab 4

4 pages

Lecture 7

Lecture 7

52 pages

Lecture 20

Lecture 20

129 pages

Lecture 15

Lecture 15

132 pages

Lecture 9

Lecture 9

95 pages

Lecture 30

Lecture 30

108 pages

Lecture 17

Lecture 17

106 pages

Load more
Download Lecture 28
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lecture 28 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lecture 28 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?