COMPSCI 61A Midterm: Midterm I Review
zogo39484755 and 6 others unlocked
22
COMPSCI 61A Full Course Notes
Verified Note
22 documents
Document Summary
Name of a frame should be the intrinsic name of the function. Not the name pointing to the intrinsic function. Lambda functions are defined where they are evaluated. Parent frame of a function never changes once you write it down. Whenever you see a negative number, like -n, just replace it with len(lst) - n. In list slicing, if you go out of bounds, you don"t error, you just return as much as you can. List indexing out of bounds will return an error. No parentheses mean you"re just referring to the name. Parent of the function is the frame in which the function was defined. Don"t be freaked out by things like f(3)(2)(6) Consider the input and output of the function. A recursive function must always return a value of the same type!! Assume your solution is correct and you"ll be. The input to the recursive call must be closer to the base case.