Archived course page. The lecture, demo and assignment files for this course were not all kept, so many of the links below no longer work. Back to Teaching

WLU Logo CS 111 (W '13), Fundamentals of Programming I (Stough)

TA Evening Office Hours:

Thursday 8-10 (Gabi, Cory)
Sunday 7-10 (Haley & Deirdre, Gabi, Cory)
Monday 9-10 (Haley & Deirdre)

Schedule:

Lecture Date Topics Assigned / Referenced
Assignments Due/Comments

Week 1
Chapters 1, 2:
    -Algorithms
    -Hardware
    -Introductory Python: Data Types, Expressions


0
M, Jan 7
  What are algorithms?
  Six fundamental concepts of programming languages.
  Quotes

  Syllabus

  General Exhaustive Python Reference
  Some useful Python tutorials - may not be in python3

  Putting python on your computer, some instructions:
   -Installing Python 3 on Windows and Mac machines: see here.
   -Unix: depends.


  Lambert textbook website (with example programs): here.
  Read unofficial intro

  Read Chapters 1, 2

  Official Tutorial: here

  Built-in Functions


T, Jan 8
  Unix
        
  Python coding: input, processing, output, string formatting (newer way)
    -littleIntro.py
    -average3.py 
    -funWithFormatting.py
  ps1 work 
 
 
Problem Set 1 
  -problemSet1.py 

1
W, Jan 9
  Computer Hardware
  Binary Numbers
  Algorithms

  Official Python3 tutorial

 
2
F, Jan 11
  Notes on transferring files to/from your Unix account:
    -What is ftp (file transfer protocol), how is it used?
    -ftp clients for Mac here 
    -ftp clients for Windows here (filezilla is most popular)
    -If you use Firefox web browser, then fireftp.
  More on algorithms
  Python: data types
  Official document: Built-in Types
  Read Chapter 3

Week 2
  Chapter 3:
    -Control Statements, iteration: if, for, while
 Chapter 3

3
M, Jan 14
  Expressions
  Calling Functions
  Writing your own functions


  Problem Set 1 due today
    -problemSet1.py
    -moneyTries.py  

T, Jan 15
  Conditionals, if
  for, while loops: initialization, condition, body, update
  Problem Set 2
  -problemSet2.py
 
4
W, Jan 16
  More on if, for/while


5
F, Jan 18
  Logical Operators: and, or, not,...
  Boolean Logic - wiki
  Truth tables
  More on loops, iterables
    -guessGame.py 
  Read Chapter 4

Week 3   Chapter 4:
    -Strings
    -Number Systems
    -Reading/Writing Text/Data Files
  Chapter 4

6
M, Jan 21
  String methods: len, split, upper, find, many others 
  Number systems
  Binary conversion
  Problem Set 3 
  -problemSet3.py 
  Problem Set 2 due today
    -problemSet2.py 

T, Jan 22
  Input/output processing using strings
  ps3 work
    -guessGame.py
    -decimaltobinary.py
    -binarytodecimal.py


7
W, Jan 23
  Reading and Writing text files.
    -pricing.py
    -storeItems.txt, mary.txt
  Directory structure, os module
  Practice Midterm 


F, Jan 25
  Review

  Practice Midterm due IN CLASS
  Problem Set 3 due today
    -problemSet3.py 

Week 4
  Chapter 5:
    -Lists, syntax/interface/functionality
    -List Comprehensions
    -Dictionaries



M, Jan 28
  Midterm 1
  Read Chapter 5

8
T, Jan 29
  List objects, syntax, interface
  List methods - index, remove, append, pop, and more 
    -studentScores.txt (random names/numbers) 
  Write our own functions using lists 
  Problem Set 4 
  -listDictMethods.py 

9
W, Jan 30
  More on Lists, list comprehensions


10
F, Feb 1
  Dictionary methods (official doc)
  Write our own functions using dictionaries
    -pricingWithDict.py  
  Read Chapter 6  

Week 5
  Chapter 6:
    -Design with Functions
    -Recursion
    -Scope
    -map/filter/reduce, anonymous (lambda) functions



11
M, Feb 4
  Design With Functions
    -doctor.py 
  Problem Set 5 
  Problem Set 4 due today
    -listDictMethods.py

T, Feb 5
  Work with Dictionaries
    -studentScores.txt (random names/numbers) 
  Recursion


12
W, Feb 6
  Recursion
    binary search
  Scope, higher-order functions
  Jokes: here, and here.


13
F, Feb 8
  Finish Ch. 6
  Read Chapter 7  

Week 6
  Chapter 7:
    -Graphics and Image Processing
    -Using Classes


14
M, Feb 11
  Graphics Systems
  Turtle Graphics - full reference here 
    -introTurtle.py 
    -ccurve.py 
  Problem Set 6 
  -graphicsFun.py 
  -additional patterns  
  Problem Set 5 due today
    -recMethods.py

T, Feb 12
  Koch snowflake
  Graphics interaction: listeners, interupts
  ps6 work


15
W, Feb 13
  Image Processing
    -images.py 
    -imageProcessingIntro.py 
    -FallColonnade.gif 
    -smokey.gif 
    -aerial.gif 


16
F, Feb 15
  Quiz
  Read Chapter 8








  Washington Break, Feb 18-22








Week 7
  Chapter 8:
    -Class Design, data members/methods
    -Numerical Emulation, polymorphism
    -Inheritance


17
M, Feb 25
  Classes, data abstraction (rectangle, six-sided die)
  Class design
  Abstraction and Encapsulation
    -bankAccount.py 
    -craps.py
  Problem Set 7 
  -rational.py  
  -meaning here 
  Problem Set 6 due today

T, Feb 26   Polymorphism
  Numerical Emulation - more here 
  ps7 work


18
W, Feb 27   Inheritance 
    -people.py 
    -vector.py 


19
F, Mar 1
  More on Inheritance
  Set operations: intersection, union, difference, xor

  Read Chapter 9


Week 8
  Chapters 8, 9:
    -Graphical User Interfaces
    -User Interaction, Event-driven Programming


20
M, Mar 4
  Object Interaction, inter-relation
    -cards.py - finish Hand class
    -blackjack.py 
  Optional project due March 15:
    -blackjackGUI.py 
    -DECK.zip  
  Practice Midterm   Problem Set 7 due today
   
-rational.py 

T, Mar 5
  GUI's and Interaction
    -labeldemo.py  
    -buttondemo.py 
    -carddemo.py 
    -messageboxDemo.py 
  Tk and tkinter exhaustive references: here, (here's a good short one)


21
W, Mar 6
  review


  Practice Midterm due IN CLASS

F, Mar 8
 
  SSA - Science, Society & the Arts Conference (no class)
 

 


Week 9
  Chapter 11:
    -Complexity Analysis
    -Searching
    -Sorting



M, Mar 11
  Midterm 2
  Read Chapter 11
    at sakai (Resources)


 midterm2Code.py
22
T, Mar 12
  Midterm Review
  Write our own functions using dictionaries
    -pricingWithDict.py  
 
 
 
  Problem Set 8  

23
W, Mar 13
  Guessing Game / Binary Search Rehash
  Searching - linear on unsorted, linear on sorted, binary
    -testSearch.py  
  Big O-notation t
  Variations on the computation of Fibonacci numbers
    -fibonacciPrograms.py


24
F, Mar 15

  O(N^2) Sorting
  Selection sort
  Insertion sort
  Read Section 17.1
    at sakai (Resources)

 

 
Week 10   Ch 17.1. More Sorting
 


25
M, Mar 18
  O(N^2) sorting implementations
  Quicksort, and implementation
 



T, Mar 19
  Mergesort, and implementation 
  ps8
 

26
W, Mar 20
  Quicksort


27
F, Mar 22
  Larger Quiz
  Radix sort:
    -radix.py  
  review
  Read this, by P. Metaxas
          of Williams College
  Problem Set 8 due today
    -sortingTests.py

Week 11   Parallel and Distributed Computing:
    -multiprocessing Python module
    -range, precision, dependencies, task decomposition
    -task/data parallelism


28
M, Mar 25
  Quiz
  Parallelism
  Mergesort
  Problem Set 9
   

T, Mar 26
  multiprocessing module
    -parallelHello.py 
  Integration
    -parallelIntegration.py
  Sum of Primes
  Monte Carlo Simulation of pi


29
W, Mar 27
  Continue with Pool, data-parallel processing
    -parallelMergesort using Pool
 


30
F, Mar 29
  Process/Pipe
    -parallelMergesort.py 
  Much more on parallelism: here, and here.
  Read Chapter 10


Week 12   Chapter 10:
    -Multithreading
    -Networks
    -Client/Server Programming


31
M, Apr 1
  Multithreading
    -threadBasic.py
    -threadSleepy.py
    -threadProdCons.py
  Practice Final   Problem Set 9 due today
32
T, Apr 2
  Networks
    -time server/client: timeclient.py, timeserver.py
    -chat application:
      -two-way: chatserver.py, chatclient.py
      -chat-room: chatserverRoom.py, chatclientRoom.py, chatrecord.py

 

W, Apr 3
  Review
 
 
  Practice Final due IN CLASS

F, Apr 5
  Final Exam!!!