Welcome to CS 8 Introduction to Computer Science!

CS 8 Programming Assignments

Assignment Hints
PA08: ImageEffects due 11pm, Dec 12 (the last PA, yea!)
  1. This PA weights 2x as any of the other PAs. Be sure to work on it and earn more points towards then end of quarter!
  2. Download cImage.py.
    If you encounter "AttributeError: 'tuple' object has no attribute 'split'," change "p = [int(j) for j in self.im.get(x,y).split()]" to "p = self.im.get(x,y)" in cImage.py line 310 (details here). This is a known bug in cImage between Python 3.2 and 3.4.
  3. Slide Lab09
PA07: Illustration due 11pm, Dec 5
  1. Note: This is a regular PA, not an extra-credit one.
  2. Use Prof. Koc's code as an example, and create your own graph by changing things inside draw(xs).
  3. Slide Lab08
  4. Most Creative One
    from my labs
    Most Creative One
    from Bingzhe's labs
Nov. 27
  1. Happy Thanksgiving!
    PA06: 20Qs-like due 11pm, Nov 21
    1. PA06 Hints
    Prepare Midterm
    1. Make sure you did the Sample Midterm!
    PA05: Dictionary Lookup due 11pm, Nov 14
    1. Follow Prof. Koc's PA05 webpage and understand how to read/write files.
    2. PA05 Hints
    PA04: Drunkard's Walk due 11pm, Nov 7
    1. It is due on FRIDAY instead of Thursday, yea!
    2. Optional: form a team of two (who have the same TA), and 1 person submits this PA, and please include your team member names in your main program.
    3. Slide Lab05
    PA03: Vigenere Cipher! due 11pm, Oct 30
    1. Use ord, chr, and modular (%) arithmetic. Do not import.
    2. Understand what is Vigenere Cipher before you start.
    3. Check my slides for hints.
    4. To verify, simply use: print(decVigenere('mykey',encVigenere('mykey','something'))) and see if it prints "something".
    PA02: 5 functions due 11pm, Oct 23
    1. Follow Emilie's handout for pa02 is a good choice!
    2. My Lab03 Slides
    3. Check Python Turtle for using turtle
    4. You can use this python file to test the correctness of your code.
    PA01: Sum(i,j) due 11pm, Oct 16
    1. def Sum(i,j):
    2. Use if-statement and for-loop
    3. Check Emilie's handout for pa01
    4. You can use this python file to test the correctness of your code.