Statements Statements are executed by the interpreter to perform an action A Compound Statement is a statement that can span over multiple lines. A Clause is a single header followe...
CS61A: Conditional Statements
CS61A: Multiple Environments
Multiple Environments Tracing a User-Defined Function Code Behind the Scenes Def Statement A new function is created! The name is bounded to the ...
CS61A: Miscellaneous Python Features
Overview Operators Multiple Return Values Docstrings Doctests Default Arguments Operators Shorthand notation for calling builtin functions. from operator import add, mul (2+3*4+5...
CS61A: Print and None type
Forethought Consider >>> -2 -2 >>> print(-2) -2 There is a difference in the two. The print function and the None value Python has rules for automatically displaying values o...
CS61A: Environmental Diagrams
Environment Diagrams Used to keep track what goes on in the python interpreter. Memory that keeps track of bindings between names and values. Expressed in the form of pictures Operates in ...
CS61A: Defining Functions
Defining Functions Assignment -> abstraction (names are associated to values.) Functions give more flexibility as the names are dynamic. They change as the expression re-evaluates....
CS61A: Functions
Elements of Programming A programming language provides many means for how to combine simple ideas to perform complex actions. There are three main considerations: Primitive expressio...
'CS61A: Lecture 1'
The Instructor Team John Denero (he/him) - denero@berkeley.edu CS 61A Instructor Researches language models and how people use them Office hours 1-3pm Tuesdays in Warren 1...
Introduction to Computer Architecture
Evolution of Automated Computing devices Charles Babbage’s Analytical Engine ENIAC (Electronic Numerical Integrator and Computer) IBM PC (8088) Charles Babbage’s Analytical Engine Charles...
Dijkstra's Algorithm
Dijkstra’s Algorithm In Computer Science, a common problem that we encounter are parthfinding problems. These problems are typically seen in GPS programs, maze-solvers, or robotics. We would typic...