Welcome to CS 61A!
John DeNero
[email protected]
Office hours in 781 Soda
(starting next week)
Functions
Wed 10am-11am & Thurs 10am-11am
By appointment: denero.org/meet.html
Fastest way to get answers: piazza.com/berkeley/spring2018/cs61a
2
The 61A Community Parts of the Course
44 teaching assistants (TAs), formally known at Berkeley as UGSIs: Lecture: Videos posted to cs61a.org before each live lecture
• Teach lab & discussion sections
Lab section: The most important part of this course (next week)
• Hold drop-in office hours
• Lots of other stuff: develop assignments, grade exams, etc. Discussion section: The most important part of this course (this week)
Staff office hours: The most important part of this course (next week)
50+ mentors:
• Teach mentoring sections Online textbook: http://composingprograms.com
• Hold drop-in office hours
• Lots of other stuff: homework parties, mastery sections, etc. Weekly homework assignments, three exams, & four programming projects
Lots of optional special events to help you complete all this work
250+ academic interns help answer individual questions & check your progress
1,300+ fellow students make CS 61A unique
3 4
What is Computer Science?
What problems can be solved using computation,
The study of How to solve those problems, and
What techniques lead to effective solutions
Systems
Artificial Intelligence Decision Making
An Introduction to Computer Science
Graphics Robotics
Security
Natural Language Processing Answering Questions
Networking
... Translation
Programming Languages
Theory ...
Scientific Computing
...
What is This Course About?
A course about managing complexity
Mastering abstraction
Programming paradigms
An introduction to programming
Alternatives to CS 61A
Full understanding of Python fundamentals
Combining multiple ideas in large projects
How computers interpret programming languages
Different types of languages: Scheme & SQL
A challenging course that will demand a lot of you
7
CS 10: The Beauty and Joy of Computing Data Science 8: Foundations of Data Science
Designed for students without prior experience Fundamentals of computing, statistical
inference, & machine learning applied to
A programming environment created by Berkeley, real-world data sets
now used in courses around the world and online
More statistics than computer science
An introduction to fundamentals (& Python)
that sets students up for success in CS 61A Great programming practice for CS 61A
Spring 2018: Dan Garcia Cross-listed as CS C8, Stat C8, & Info C8
20+ person waitlist Spring 2018: Ani Adhikari
More info: http://cs10.org/sp18/ 100+ person waitlist
More info: http://data8.org/sp18
9 10
Course Policies
Learning
Course Policies Community
Course Staff
Details...
http://cs61a.org/articles/about.html
12
Collaboration
Asking questions is highly encouraged
• Discuss everything with each other; learn from your fellow students!
• Some projects can be completed with a partner
• Choose a partner from your discussion section
Expressions
The limits of collaboration
• One simple rule: Don’t share your code, except with your project partner
• Copying project solutions causes people to fail the course
• We really do catch people who violate the rules, because...
• We also know how to search the web for solutions
• We use computers to check your work
Build good habits now
13
Types of expressions Call Expressions in Python
An expression describes a computation and evaluates to a value
18 + 69 log2 1024
6 sin ⇡
23 All expressions can use function call notation
2100 p (Demo)
3493161
f (x)
100
X 1
7 mod 2 lim
i ✓ ◆ x!1 x
i=1
69
| 1869| 18
15 16
Anatomy of a Call Expression Evaluating Nested Expressions
add ( 2 , 3 )
224
Operator Operand Operand mul(add(4, mul(4, 6)), add(3, 5))
Operators and operands are also expressions
mul 28 8
add(4, mul(4, 6)) add(3, 5)
So they evaluate to values
Evaluation procedure for call expressions: add 4 24 add 3 5
mul(4, 6)
1. Evaluate the operator and then the operand subexpressions
2. Apply the function that is the value of the operator subexpression to mul 4 6
the arguments that are the values of the operand subexpression
17 18
Evaluating Nested Expressions
Value of the whole expression
Operand subexpression
224
mul(add(4, mul(4, 6)), add(3, 5))
Value of subexpression 1st argument to mul
mul 28 8
add(4, mul(4, 6)) add(3, 5) Functions, Values, Objects, Interpreters, and Data
(Demo)
add 4 24 add 3 5
mul(4, 6)
mul 4 6
Expression tree
19