Previous Lecture Lecture 13 Next Lecture

Lecture 13, Wed 09/05

ic01, stacks

Code from class

https://github.com/ucsb-cs8-m18/code-from-class/tree/master/09-05


iClicker Questions
==================

0. What does the following code return when called with f(2)?

   def f(x):
     if x == 0:
       return 0
     else:
       return f(x-1)

   (a) 0
   (b) 1
   (c) 2
   (d) None of the above

1. What about f(-2)?
   
   (a) 0
   (b) -1
   (c) -2
   (d) None of the above

In-Class Questions / Schedule of Events