λ³Έλ¬Έ λ°”λ‘œκ°€κΈ°

University of California, Berkeley/ElectricalEngineering & ComputerSciences

Week 2

Week 2 Resources

https://sequoia-tree.github.io/techniques-in-computer-science/booleans.html

 

Booleans

Recall True and False are the two booleans in Python. It turns out they're pretty handy. For instance, what if we want to do something, but only if a particular condition is True? What if we want to repeat something until that condition is False? These sor

sequoia-tree.github.io

https://sequoia-tree.github.io/techniques-in-computer-science/iteration.html

 

Iteration

Fundamentals of iteration Many programming tasks require you to repeat a process over and over again, until something happens. For instance, it could be counting until you reach some number. It could be repeatedly refining your estimate of a quantity until

sequoia-tree.github.io

http://albertwu.org/cs61a/review/control/exam.html

 

Control Structures: exam

If you need help reviewing Control Structures, take a look at these resources: Each question has a "Toggle Solution" button -- click it to reveal that question's solution. You need to enable JavaScript to view the solutions. What would Python print? Questi

albertwu.org

http://pythontutor.com/composingprograms.html#mode=edit

 

Online Python Tutor - Composing Programs - Python 3

Write code in Python 3.6 and display frames of exited functions. don't display exited functions. Someone is typing ... Visualize Execution Live Programming Mode

pythontutor.com

http://albertwu.org/cs61a/review/environments/exam.html

 

Environment Diagrams: exam

If you need help reviewing Environment Diagrams, take a look at these resources: Each question has a "Toggle Solution" button -- click it to reveal that question's solution. You need to enable JavaScript to view the solutions. Environment Diagrams Question

albertwu.org

http://www.tmmydngyn.me/cs61a/guides/env-diag.html

 

Environment Diagrams

Although environment diagrams come off as very scary and daunting, it really just is a diagram that keeps track of your variables. It does absolutely nothing else. An environment diagram consists solely of frames containing variables bound to their values.

www.tmmydngyn.me

https://docs.google.com/document/d/1zuuj92z_ZEw8ubM34sw5vAJtk_vN1u6CVKr1d95Olts/edit

 

Environment Diagrams

Environment Diagrams Objectives: Understand rules for evaluation and representation of expressions in Python. Getting Started, what environment diagrams are Environment diagrams essentially allow us to run code without a computer in a clear, organized way.

docs.google.com

https://docs.google.com/presentation/d/1i1Ojc8MJpNh195O-sf6ZDAf0urRYygdv0OZ7EYUWPYI/edit#slide=id.p

 

Jennifer's Environment Diagram Cheat Sheet

Assignment statements: x, y = 2, 3 x, y = y, x (This swaps x and y: x becomes 3 and y becomes 2) Evaluate operands on RHS (from left to right) Bind variables on LHS to values on RHS Jennifer's Environment Diagram Cheat Sheet Call Expressions: f(lambda: x)

docs.google.com

http://markmiyashita.com/cs61a/environment_diagrams/

 

CS61A - Environment Diagrams - Mark Miyashita

Environment Diagrams may seem tricky at first but they’re really useful in analyzing how functions are evaluated. If you follow these simple steps, you’ll be able to draw out any environment diagram. As with all things CS-related, practice, practice, pract

markmiyashita.com

https://drive.google.com/file/d/0B_XgYxvE0IxpOWg5c013cFZXc0E/view

 

env_diag_party.pdf

 

drive.google.com

https://sequoia-tree.github.io/techniques-in-computer-science/lambda-functions.html

 

Lambda Functions

Defining lambda functions Consider the code below. It does two things. def five(): return 5 First of all, it creates a new function whose output is 5. Second, it makes the variable five point at that function. [Not supported by viewer] [Not supported by vi

sequoia-tree.github.io

http://albertwu.org/cs61a/review/lambdas/exam.html

 

Lambda Expressions: exam

If you need help reviewing Lambda Expressions, take a look at these resources: Each question has a "Toggle Solution" button -- click it to reveal that question's solution. You need to enable JavaScript to view the solutions. Code-Writing questions Question

albertwu.org

https://sequoia-tree.github.io/techniques-in-computer-science/higher-order-functions.html

 

Higher-Order Functions

 

sequoia-tree.github.io

http://albertwu.org/cs61a/review/hof/exam.html

 

Higher-Order Functions: exam

If you need help reviewing Higher-Order Functions, take a look at these resources: Each question has a "Toggle Solution" button -- click it to reveal that question's solution. You need to enable JavaScript to view the solutions. Environment Diagrams Questi

albertwu.org

 

'University of California, Berkeley > ElectricalEngineering & ComputerSciences' μΉ΄ν…Œκ³ λ¦¬μ˜ λ‹€λ₯Έ κΈ€

LAB_day 2  (0) 2019.07.02
Higher-Order Functions  (0) 2019.07.02
Environment Diagrams  (0) 2019.06.28
LAB_day 1  (0) 2019.06.27
Control  (0) 2019.06.27