61a lecture 1
play

61A Lecture 1 Friday, August 30, 2013 2 The Course Staff 0 1 2 - PDF document

Welcome to Berkeley Computer Science! 61A Lecture 1 Friday, August 30, 2013 2 The Course Staff 0 1 2 3 4 5 6 7 8 years TAs hold discussion sections, labs, and office hours An Introduction to Computer Science Readers are your personal


  1. Welcome to Berkeley Computer Science! 61A Lecture 1 Friday, August 30, 2013 2 The Course Staff 0 1 2 3 4 5 6 7 8 years TAs hold discussion sections, labs, and office hours An Introduction to Computer Science Readers are your personal programming mentors Lab Assistants ensure that you don’t get stuck for too long 3 What is Computer Science? What is This Course About? What problems can be solved using computation, • A course about managing complexity The study of How to solve those problems, and  Mastering abstraction What design choices lead to effective solutions.  Programming paradigms Systems Games  Not about 1’s and 0’s Artificial Intelligence Robotics Graphics • An introduction to Python Security Natural Language Processing  All the features we really need: introduced today Networking ...  Understanding through implementation Programming Languages Theory  How computers interpret programming languages Scientific Computing • A challenging course that will demand a lot of you ... 5 6

  2. What is This Course About? Course Logistics and Policies Plone Conference. Photo courtesy of Kriszta Szita 7 Alternatives to This Course Course Policies The purpose of this course is to help you learn CS 61AS: Self-paced 61A The staff is here to make you successful CS 10: The Beauty and Joy of Computing All the details are online: http://inst.eecs.berkeley.edu/~cs61A/fa13/about.html 9 10 Collaboration • Discuss everything with each other • EPA : Effort, participation, and altruism • Homework can be completed with a partner • Projects should be completed with a partner • Find a project partner in your section (if you can) Expressions The limits of collaboration • One simple rule: Don’t share your code, except with partners • Copying project solutions is a serious offense! • We really do catch people who violate the rules • We also know how to search the web for solutions • We let computers detect copying for us 11

  3. Types of expressions Call Expressions in Python An expression describes a computation and evaluates to a value All expressions can use function call notation 18 + 69 sin π 6 (Demo) 23 √ 3493161 f ( x ) 100 X i ✓ 69 ◆ i =1 | − 1869 | 18 13 14 Anatomy of a Call Expression Evaluating Nested Expressions add ( 2 , 3 ) 208 Operator Operand 0 Operand 1 mul(add(2, mul(4, 6)), add(3, 5)) Operators and operands are expressions 8 mul 26 add(3, 5) add(2, mul(4, 6)) So they evaluate to values add 3 5 add 2 24 Evaluation procedure for call expressions: mul(4, 6) 1. Evaluate the operator and operand subexpressions mul 4 6 2. Apply the function that is the value of the operator subexpression to the arguments that are the values of the operand subexpression 15 16 Evaluating Nested Expressions Data, Functions, and Interpreters Data : The things that programs fiddle with Operand 0 “subexpression” 208 “The Art of Computer Programming” mul(add(2, mul(4, 6)), add(3, 5)) 2 Shakespeare’s 37 plays Donald Knuth 8 mul 26 (Ka-NOOTH) add(3, 5) add(2, mul(4, 6)) Functions : Rules for manipulating data add 3 5 add 2 24 Count the words in a line of text mul(4, 6) Add up numbers Pronounce someone’s name mul 4 6 Interpreter : An implementation of the procedure for evaluation Expression tree 17 18

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend