Nov 17
ATM data structure & simulation example
Discuss my code in the
atm folder.
Perhaps modify it according to one of the "TODO"
items in its top docstring.
recursion examples & practice
Check out the examples in the
recursion folder :
searching a list, finding the max in a list, and a
complete computer player engine for the subtraction game.
We'll look some of these over the next week or so.
The idea behind computer game search is this :
- Well, if we can win on this move, do that.
- Otherwise, take the best move of the positions we can reach. (Recursion!)
art
This site isn't python,
but is a nice collection of images defined with recursion.
Something along these lines could be accomplished
with Zelle's graphic library as a possible final project.
Recursion Class Exercise :
Write a recursive function that finds the maximum value of a list.
The idea is to think of a list recursively as
(list) = (first_element, list)
and so max(list) = max( first_element, max(list) )
What is the stopping condition ?
Two versions of this exercise are attached.