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 (F '11), Fundamentals of Programming I (Stough)

 

Schedule:

Lecture Date Topics Assigned / Referenced
Assignments Due/Comments
0
F, Sep 9
  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 Chapters 1, 2

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

1
M, Sep 12
  Computer Hardware
  Binary Numbers
  Algorithms
  Problem Set 1 
  -problemSet1.py 
 

T, Sep 13
  Unix
  Little HTML: example.html, example.css, example.gif, favicon.ico    
  Python coding: input, processing, output, string formatting (newer way)
    -hello.py
    -average3.py 
    -funWithFormatting.py
  ps1 work 


2
W, Sep 14
  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


3
F, Sep 16
  Expressions
  Calling Functions
  Writing your own functions
  Official document: Built-in Functions 
  Official Python Tutorial: here 
  Read Chapter 3

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

4
M, Sep 19
  Conditionals, if
  for, while loops: initialization, condition, body, update
  Problem Set 2
  -problemSet2.py
  Problem Set 1 due today
    -problemSet1.py 

T, Sep 20
  Function practice
  Looping practice
  ps2 work


5
W, Sep 21
  Logical Operators: and, or, not,...
  Boolean Logic - wiki
  Truth tables


6
F, Sep 23
  More on loops, iterables
    -guessGame.py 
  Read Chapter 4

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

7
M, Sep 26
  Subscripting, slicing, substrings
    -moneyTries.py
  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, Sep 27
  Input/output processing using strings
  Number systems 
    -decimaltobinary.py  
    -binarytodecimal.py  
  ps3 work


8
W, Sep 28
  Reading and Writing text files.
    -pricing.py
    -storeItems.txt, mary.txt
  Directory structure, os module
  Practice Midterm 


F, Sep 29
  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, Oct 3
  Midterm 1
  Read Chapter 5

9
T, Oct 4
  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 

10
W, Oct 5
  Dictionaries and methods (official doc)


11
F, Oct 7
  Dictionary methods
  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



12
M, Oct 10
  Design With Functions
    -doctor.py 
  Problem Set 5 
  Problem Set 4 due today
    -listDictMethods.py

T, Oct 11
  Recursion


13
W, Oct 12
  Scope, higher-order functions
  Jokes: here, and here.
  Week 5 in class code.




  October 13-14: reading days. 
  Read Chapter 7  

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


14
M, Oct 17
  Big Quiz
  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, Oct 18
  Koch snowflake
  Graphics interaction: listeners, interupts
  ps6 work


15
W, Oct 19
  Image Processing
    -images.py 
    -imageProcessingIntro.py 
    -FallColonnade.gif 
    -smokey.gif 
    -aerial.gif 


16
F, Oct 21
  Classes, data abstraction (rectangle, six-sided die)
  Read Chapter 8


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


17
M, Oct 24
  Class design
  Abstraction and Encapsulation
    -bankAccount.py 
    -craps.py
  Problem Set 7 
  -rational.py  
  Problem Set 6 due today

T, Oct 25
  Polymorphism
  Numerical Emulation - more here 
  ps7 work


18
W, Oct 26
  Inheritance
    -people.py 
    -vector.py 
  some code we typed: here 


19
F, Oct 28
  Object Interaction, inter-relation
    -cards.py - finish Hand class
    -blackjack.py 
  Problem Set 8
  -blackjackGUI.py 
  -DECK.zip  
 
  Read Chapter 9
  Problem Set 7 due today

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


20
M, Oct 31
  GUI's and Interaction
    -labeldemo.py  
    -buttondemo.py 
    -carddemo.py 
    -messageboxDemo.py 
  Tk and tkinter exhaustive references: here, (here's a good short one)



T, Nov 1
  Event-driven programming
  ps8 work


21
W, Nov 2
 
  Practice Midterm



F, Nov 4
  Review
 
  Practice Midterm due IN CLASS
  Problem Set 8 due today
    -blackjackGUI.py 

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



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

  Problem Set 9

22
T, Nov 8
  Guessing Game / Binary Search Rehash
  Searching - linear on unsorted, linear on sorted, binary
    -testSearch.py  
  Big O-notation
  Variations on the computation of Fibonacci numbers
    -fibonacciPrograms.py 
 

23
W, Nov 9
  O(N^2) Sorting
  Selection sort
  Insertion sort


24
F, Nov 11
  Begin Data Structures
  Arrays
    -arrays.py 
  Our own List
    -list.py (from Friday's class)
  Review Chapters 8, 11

  Problem Set 10
    -Chapter 13 on sakai

 
Week 10   Chapters 11, 8:
    -Data Structures
    -Collections (allowing for efficient interaction/manipulation)



M, Nov 14
   No class
 
  Problem Set 9 due today
    -sortingTests.py

T, Nov 15
   No class
 

25
W, Nov 16
  Finish List
  Our own Dictionary
    -radix.py  
  ps10 work


26
F, Nov 18
  Stacks and Queues - restricted linear collections 
  Analysis

  Problem Set 10 due today
    -list.py
    -dict.py


  Thanksgiving Holiday, Nov 21-25
  Read this, by P. Metaxas
          of Williams College


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


27
M, Nov 28
  Parallelism
  Mergesort
  Problem Set 11
   

T, Nov 29
  multiprocessing module
    -parallelHello.py 
  Integration
    -parallelIntegration.py


28
W, Nov 30
  Continue with Pool, data-parallel processing
  Process/Pipe
    -parallelMergesort.py 
  Much more on parallelism: here, and here.


29
F, Dec 2
  Review
  Distributed Computing
  Read Chapter 10


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


30
M, Dec 5
  Multithreading
    -threadBasic.py
    -threadSleepy.py
    -threadProdCons.py

  
31
T, Dec 6
  Networks
    -time server/client: timeclient.py, timeserver.py
    -chat application:
      -two-way: chatserver.py, chatclient.py
      -chat-room: chatserverRoom.py, chatclientRoom.py, chatrecord.py

 
32
W, Dec 7
  Review
  Practice Final
  quizzes.zip
  Problem Set 11 due today

F, Dec 9
  Review

  Practice Final due IN CLASS


  Final exams from Saturday December 10 2PM until Friday December 16 5PM