Previous Lecture Lecture 8 Next Lecture

Lecture 8, Wed 08/22

files, more loops

Code from class

https://github.com/ucsb-cs8-m18/code-from-class/tree/master/08-22


Midterm notes must be handwritten!

If you turn in your HW through Gradescope, you don’t have to turn it in in class.


iClicker Questions

0. Which while loop implements the same functionality as the following for loop?
   
   for i in range(5):
       print(i)

   (a) i = 1
       while i <= 5:
           print(i)
           i += 1
   (b) i = 1
       while i < 5:
           print(i)
           i += 1
   (c) i = 0
       while i < 5:
           print(i)
           i += 1
   (d) i = 0
       while i <= 5:
           print(i)
           i += 1
   (e) None of the above

In-Class Questions / Schedule of Events