Difference between revisions of "Summer 2014 Exam 2"

From CS 61A Wiki
Jump to: navigation, search
[checked revision][checked revision]
(Practice Problems)
 
(20 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
{{purge}}
 
{{purge}}
 
  
 
== Logistics ==
 
== Logistics ==
Line 16: Line 15:
 
* Any sort of electronics
 
* Any sort of electronics
 
** Cell phones are okay, but must be turned off for the duration of the exam
 
** Cell phones are okay, but must be turned off for the duration of the exam
 
  
 
== Topics ==
 
== Topics ==
Line 24: Line 22:
 
! Exam 2 Topics
 
! Exam 2 Topics
 
|-
 
|-
| nonlocal and functions using nonlocal
+
| [[nonlocal]] and functions using nonlocal
 
|-
 
|-
| Mutable Python data structures and functions on them
+
| Mutable Python data structures and functions on them ([[Sequence#Mutable_sequences|List]], [[Dictionary]])
 
|-
 
|-
| Environment Diagrams on the above
+
| [[Environment diagram|Environment diagrams]] on the above
 
|-
 
|-
| Object Oriented Programming
+
| [[Object-oriented programming|Object Oriented Programming]]
 
|-
 
|-
| Interfaces and 'Magic' methods
+
| Interfaces and [[Magic method|'Magic' methods]]
 
|-
 
|-
 
| [[Linked_list#OOP_ADT | Linked Lists]] (Known as Rlists in previous semesters)
 
| [[Linked_list#OOP_ADT | Linked Lists]] (Known as Rlists in previous semesters)
 
|-
 
|-
| Mutable Trees (the kind with datum and children attributes)
+
| [[Tree#Mutable Tree (OOP)|(Mutable) Trees]] (the kind with datum and children attributes)
 +
|-
 +
| [[Tree#Python_2|Binary Trees]] (the kind with entry, left, and right)
 
|-
 
|-
 
| [[Iterator]]s, [[Iterable]]s and [[Generator]]s
 
| [[Iterator]]s, [[Iterable]]s and [[Generator]]s
Line 91: Line 91:
 
* '''Draw Box and pointer diagrams for mutable data structures'''
 
* '''Draw Box and pointer diagrams for mutable data structures'''
 
* '''Drawing Environment diagrams with nonlocal'''
 
* '''Drawing Environment diagrams with nonlocal'''
 +
* '''Reading the problem critically/figuring out what the problem is asking'''
 +
* '''Understanding doctests'''
 
* Designing classes for Object Oriented Programming problems
 
* Designing classes for Object Oriented Programming problems
  
Line 105: Line 107:
 
* [https://docs.google.com/document/d/1Zi-IM4Ptq2ymN0qtM6axqWryQpLLNthMZNoXKZBuu2E/edit?usp=sharing Andrew's Midterm 2 Warmup Questions]
 
* [https://docs.google.com/document/d/1Zi-IM4Ptq2ymN0qtM6axqWryQpLLNthMZNoXKZBuu2E/edit?usp=sharing Andrew's Midterm 2 Warmup Questions]
 
* [https://d1b10bmlvqabco.cloudfront.net/attach/hv3d500fcvs4d8/hktwxogd3mt47t/hxtvand63zl7/midtermdisc01.pdf Matthew's Week 4 Practice Problems] ([https://d1b10bmlvqabco.cloudfront.net/attach/hv3d500fcvs4d8/hktwxogd3mt47t/hxxzmp0tdtiv/midtermdisc01_sol.pdf solutions])
 
* [https://d1b10bmlvqabco.cloudfront.net/attach/hv3d500fcvs4d8/hktwxogd3mt47t/hxtvand63zl7/midtermdisc01.pdf Matthew's Week 4 Practice Problems] ([https://d1b10bmlvqabco.cloudfront.net/attach/hv3d500fcvs4d8/hktwxogd3mt47t/hxxzmp0tdtiv/midtermdisc01_sol.pdf solutions])
 +
*[https://d1b10bmlvqabco.cloudfront.net/attach/hv3d500fcvs4d8/hktwxogd3mt47t/hy3yuivujmg9/week05review.pdf Matthew's Week 5 Practice Problems]
 
* [http://tinyurl.com/q5c7cnl Youri/Beth's Review ]
 
* [http://tinyurl.com/q5c7cnl Youri/Beth's Review ]
 
* [[Practice problems]] from previous semesters, especially...
 
* [[Practice problems]] from previous semesters, especially...
Line 114: Line 117:
 
* [https://piazza.com/class/hv3d500fcvs4d8?cid=1114 Object Oriented Programming and Recursive Objects]
 
* [https://piazza.com/class/hv3d500fcvs4d8?cid=1114 Object Oriented Programming and Recursive Objects]
 
* [https://piazza.com/class/hv3d500fcvs4d8?cid=977 Sequences, nonlocal and Objects]
 
* [https://piazza.com/class/hv3d500fcvs4d8?cid=977 Sequences, nonlocal and Objects]
 +
* [https://piazza.com/class/hv3d500fcvs4d8?cid=1612 Logic & Scheme]
  
 +
=== Material Guides ===
 +
* [https://piazza.com/class/hv3d500fcvs4d8?cid=1712 Guide to Logic Programming]
 +
* [https://piazza.com/class/hv3d500fcvs4d8?cid=1538 Matthew's Logic practice problems]
 +
* [https://www.youtube.com/watch?v=BALo2L9AhlE&list=UUKDJBFhZznLgAmXyTjajC8Q Beth's Video Tutorials on Streams]
 +
 +
=== Previous Staff Guides and Websites ===
 +
* [http://youripark.github.io/practice.html Youri's website]
 +
* [http://www.dicksontsai.com/cs61a/practiceproblems.html Dickson's website]
 +
* [https://d1b10bmlvqabco.cloudfront.net/attach/hoxc5uu6sud761/gozdkhgdUbT/htdlpko411i0/Python__Immutable_vs_Mutable.pdf Quick Guide on Mutability]
 +
** [https://piazza.com/class/hv3d500fcvs4d8?cid=1152 Creating Python lists and equality]
 +
* [http://www.ocf.berkeley.edu/~shidi/cs61a/wiki/For_Loops_and_Iterators Rohin's Guide on For Loops and Iterators]
 +
* [https://piazza.com/class/hv3d500fcvs4d8?cid=109 Piazza's Useful posts and guides ]
 +
* [http://www.ocf.berkeley.edu/~shidi/cs61a/61a-fa13-midterm2-walkthrough.pdf Complete walkthrough of Fall 2013 MT2]
 +
 +
=== Weekend Review ===
 +
* [http://tinyurl.com/k5g6wcf Weeks 4 and 5] ([http://tinyurl.com/l8dk7bq Solutions])
 +
* [http://tinyurl.com/kxvgnsk Weeks 1-3] ([http://tinyurl.com/ozl5nc3 Solutions]) '''This is LOW priority! The other questions above and below are a better use of your time.'''
  
 
===Problems to Focus on from [[Past exams]]===
 
===Problems to Focus on from [[Past exams]]===
Line 270: Line 291:
 
| Orders of Growth
 
| Orders of Growth
 
|-
 
|-
Summer 2012 Final (2)
+
| Summer 2012 Final (2)
 
| Orders of Growth
 
| Orders of Growth
 
|-
 
|-
Line 279: Line 300:
 
| Scheme
 
| Scheme
 
|-
 
|-
Fall 2013 Final (1c)
+
| Fall 2013 Final (1c)
 
| Scheme
 
| Scheme
 
|-
 
|-
 
|}
 
|}
* '''Fall 2011'''
 
 
* '''Fall 2012'''
 
 
* '''Spring 2013'''
 
 
* '''Summer 2013'''
 
 
* '''Fall 2013'''
 
 
* '''Spring 2014'''
 
 
== Staff Guides and Websites ==
 
* [http://youripark.github.io/practice.html Youri's website]
 
* [https://d1b10bmlvqabco.cloudfront.net/attach/hoxc5uu6sud761/gozdkhgdUbT/htdlpko411i0/Python__Immutable_vs_Mutable.pdf Quick Guide on Mutability]
 
* [http://www.ocf.berkeley.edu/~shidi/cs61a/wiki/For_Loops_and_Iterators Rohin's Guide on For Loops and Iterators]
 
* [https://piazza.com/class/hv3d500fcvs4d8?cid=109 Piazza's Useful posts and guides ]
 
  
 
== How to study ==
 
== How to study ==

Latest revision as of 21:25, 11 August 2014

Purge this page if the LaTeX typesetting doesn't render.

Logistics

Changes from Exam 1 are in bold.

2050 VLSB, 7pm - 9pm on Thursday, July 31, 2014. Fill out the Exam 2 Conflict Form if you have a conflict.

Bring

  • pencil and eraser
  • two front and back 8.5x11" cheatsheets (the idea is you bring your old cheatsheet and one new one)
  • a copy of The Rules
    • You can write on your copy of The Rules (8.5x11"), giving you 3 cheatsheets total.

Don't bring

  • Any sort of electronics
    • Cell phones are okay, but must be turned off for the duration of the exam

Topics

New topics for Exam 2:

Exam 2 Topics
nonlocal and functions using nonlocal
Mutable Python data structures and functions on them (List, Dictionary)
Environment diagrams on the above
Object Oriented Programming
Interfaces and 'Magic' methods
Linked Lists (Known as Rlists in previous semesters)
(Mutable) Trees (the kind with datum and children attributes)
Binary Trees (the kind with entry, left, and right)
Iterators, Iterables and Generators
Generic functions
Interpreters
Scheme

Topics from Exam 1 (you are expected to know these, but they will not be the focus of the exam):

Exam 1 Topics
Python Basics
Higher-order functions and Lambda expressions
Recursion
Linked lists (ignore tuples and OOP); Also known as rlists in other semesters.
Tree Recursion
Environments / Environment diagrams (Note that our Env. Diagrams are compatible with Fall 2012 and onward.)
Sequences
Abstract data types
Trees (We haven't covered BSTs or Trees in Scheme)
Deep lists
Orders of growth
Newton's method
Halting problem (Extra Credit)

Other skills

  • Draw Box and pointer diagrams for mutable data structures
  • Drawing Environment diagrams with nonlocal
  • Reading the problem critically/figuring out what the problem is asking
  • Understanding doctests
  • Designing classes for Object Oriented Programming problems

All the skills from Exam 1 still apply:

  • Identifying the Operator and Operands
  • Drawing Function Boxes
  • Identifying Domain and Range
  • Drawing Box and Pointers
  • Environment Diagrams
  • Identifying the Theta of a function

Practice Problems

Guerrilla 61A

Material Guides

Previous Staff Guides and Websites

Weekend Review

Problems to Focus on from Past exams

Can be sorted by year or by Topic! (Default is by topic) Note: Replace Rlist with Link

Question Topic
Summer 2013 Midterm 2 (3a) Environment Diagrams with Mutable Objects
Fall 2013 Midterm 2 (2b) Environment Diagrams with Mutable Objects
Summer 2013 Final (3a) Environment Diagrams with Mutable Objects
Spring 2013 Midterm 2 (1a) Environment Diagrams with Mutable Objects
Spring 2013 Final (2) Environment Diagrams with Mutable Objects
Fall 2012 Midterm 2 (2b) Environment Diagrams with Mutable Objects
Summer 2013 Midterm 2 (3b) Environment Diagrams with Nonlocal
Summer 2013 Final (3a) Environment Diagrams with Nonlocal
Fall 2013 Midterm 2 (2a) Environment Diagrams with Nonlocal
Spring 2013 Midterm 2 (2a) Environment Diagrams with Nonlocal
Fall 2012 Midterm 2 (2a) Environment Diagrams with Nonlocal
Fall 2012 Final (2b) Environment Diagrams with Nonlocal
Summer 2012 Final (8) Environment Diagrams with Nonlocal
Fall 2011 Midterm 2 (1b) Environment Diagrams with Nonlocal
Fall 2011 Final (2a) Environment Diagrams with Nonlocal
Summer 2012 Midterm 2 (2) Using Nonlocal
Fall 2011 Midterm 2 (1a) Using Nonlocal
Fall 2013 Midterm 2 (1) Python Lists
Summer 2013 Midterm 2 (1) Python Lists
Fall 2013 Final (2a) Python Lists
Fall 2012 Midterm 2 (1a, 4b) Python Lists
Fall 2012 Final (1a) Python Lists
Summer 2012 Midterm 2 (1) Python Lists
Fall 2011 Midterm 2 (2) Python Lists
Summer 2013 Midterm 2 (4) Dictionaries
Summer 2012 Final (11) Dictionaries
Summer 2013 Midterm 2 (5, 6) Trees
Fall 2013 Midterm 2 (3c) Trees
Fall 2013 Final (4c, see r_list object in 4b) Trees
Spring 2013 Final (1) Trees
Fall 2012 Midterm 2 (3b) Trees
Fall 2012 Final (3b, 3d) Trees
Fall 2011 Midterm 2 (4e) Trees
Summer 2013 Final (2, 6) Object Oriented Programming
Spring 2013 Midterm 2 (1b, 5) Object Oriented Programming
Fall 2013 Midterm 2 (3a, 4) Object Oriented Programming
Fall 2013 Final (4b) Object Oriented Programming
Spring 2013 Final (5) Object Oriented Programming
Fall 2012 Midterm 2 (1b, 3a) Object Oriented Programming
Fall 2012 Final (3a) Object Oriented Programming
Summer 2012 Midterm 2 (4, 5) Object Oriented Programming
Summer 2012 Final (9) Object Oriented Programming
Fall 2011 Midterm 2 (3) Object Oriented Programming
Fall 2011 Final (1) Object Oriented Programming
Spring 2013 Midterm 2 (4) Iterators and Generators
Summer 2013 Final (9b) Iterators and Generators
Fall 2011 Final (6a) Iterators and Generators
Summer 2013 Final (4) Generic Functions
Summer 2013 Midterm 2 (2) Orders of Growth
Summer 2012 Final (2) Orders of Growth
Fall 2013 Final (3e) Calculator
Summer 2013 Midterm 2 (7) Scheme
Fall 2013 Final (1c) Scheme

How to study

Here is an old algorithm for studying for tests:
For each topic on the exam, find problems on them and do them.
START ON THE TOPICS YOU'RE MOST UNFAMILIAR WITH!
 If you can solve them on your own, move on.
 Else if you are stuck, look at the solution and figure out if you
 are missing a trick or if you do not understand the concepts.
   If the problem is that you are stuck on some random trick,
     just learn the trick.
       Stare at the solutions, ask Piazza, your TA, etc.
   Questions you should ask at this stage:
     What is the problem asking me to do?
     How was I suppose to follow the instructions
       to solve the problem?
     What part of the problem do I not understand?
     What is the fastest way to clear up that misunderstanding?
  Then if you think you are still stuck conceptually, review
  and learn the concept, however you learn best.

  Suggestions for picking up concepts quickly (~1-2 hours):
    Discussion notes typically have a very concise recap of the
      thing they are going over.
    There are guides for particularly tricky things on the wiki,
      like Hanoi, powerset, etc.
      Find them and go over them.
    Ask a TA: "what is the best way to learn X?"
    If these do not work and you are still shaky after an hour
    or two, it might be worth watching a lecture or reading
    the notes. Be sure to try out some more problems as you're learning!