Final Exam: Monday 3 May 2010, 1:00PM-3:00PM, in Burnham Hall 208.

Due to the mandatory furlough for faculty, our class will not meet on Friday 26 February, the day of our first scheduled midterm exam. According to advertised course policies, greater weight will automatically be placed on the final exam.
Consider working on the Midterm Homework collection!

Course Content

Slides of the lectures and Python code will be posted below.

L-1 Mon 11 Aug 2010: welcome to mcs 275 (printer friendly version )
        Python programs enumdivs.py and facnum.py
L-2 Wed 13 Jan 2010: extending Python (printer friendly version )
        Python code facnums.py ; C programs facnum0.c and facnum0.c (with a function). The C code for the module numfac.c with the Python setup.py script.
L-3 Fri 15 Jan 2010: arrays and matrices -- working with numpy (printer friendly version )
        Python code sieve.py , findmin.py , and saddle.py .
L-4 Wed 20 Jan 2010: object oriented programming (printer friendly version )
        Python code class Histogram and the script usehistogram.py ; to show variable keyword arguments of functions: dictarg.py ; and finally, a class Matrix .
L-5 Fri 22 Jan 2010: graphical user interfaces (printer friendly version )
        Python code rgbgui.py (slider for colors), billiards_basic.py (a very basic GUI) and with more features: billiards.py .
L-6 Mon 25 Jan 2010: cluster analysis -- file manipulation -- getting data from the web (printer friendly version )
        Python code makedata.py, kmeans.py, getwebdata.py, and earthquakes.py.
L-7 Wed 27 Jan 2010: counting words -- pattern matching (printer friendly version )
        Python code wordswardict.py.
L-8 Fri 29 Jan 2010: recursive problem solving -- writing recursive functions (printer friendly version )
        Python code factorial.py, palindromes.py.
L-9 Mon 1 Feb 2010: recursive drawings -- the Koch curve and flake -- L-systems (printer friendly version )
        Python code multigon.py, cantor.py, koch.py, flake.py, and hilbert.py.
L-10 Wed 3 Feb 2010: recursion versus iteration -- complexity and cost -- memoization (printer friendly version )
        Python code hanoi.py, fibonacci.py, and memofib.py.
L-11 Fri 5 Feb 2010: enumerative searches and backtracking -- the knapsack problem (printer friendly version )
        Python code enumbits.py, enumwords.py, enumwstop.py, and knapsack.py.
L-12 Mon 8 Feb 2010: solving puzzles -- applying recursive backtracking -- finding a path through a maze (printer friendly version )
        Python code maze.py, labyrinth.py, mousedraw.py, and sliding_puzzle.py.
L-13 Wed 10 Feb 2010: recursive data structures: binary and classification trees (printer friendly version )
        Python code treesort.py and treezoo.py.
L-14 Fri 12 Feb 2010: binary trees as objects -- preorder, inorder, and postorder traversals (printer friendly version )
        Python code classtree.py and substitute.py.
L-15 Mon 15 Feb 2010: problem solving via divide-and-conquer methods, binary and bisection search (printer friendly version )
        Python code findsecret.py, binarysearch.py, bisectsearch.py, and bisection.py.
L-16 Wed 17 Feb 2010: divide and conquer applied to sorting: merge and quick sort (printer friendly version )
        Python code selectsort.py, mergesort.py, and quicksort.py.
L-17 Fri 19 Feb 2010: evaluating expressions: postfix to infix -- stacks of function calls (printer friendly version )
        Python code evalexpr.py, evalpostfix.py, facstack.py, gcdstack.py, and fibstack.py.
L-18 Mon 22 Feb 2010: from recursion to iteration using a stack for the parameters of the calls (printer friendly version )
        Python code qsarray.py, hanoi2.py, and hanoi2gui.py.
L-19 Wed 24 Feb 2010: review of the first 18 lectures
First midterm exam has been furloughed. (Replacement activity: Midterm Homework Collection)
L-21 Mon 1 Mar 2010: CGI programming -- HTML forms -- processing web input by Python scripts (printer friendly version )
        HTML files give_number.html and web_gcd.html .
        Python code python_works.py , showtime.py , give_number.py , and web_gcd.py .
L-22 Wed 3 Mar 2010: client-side and server-side scripting -- passing text and commands via the web (printer friendly version )
        HTML files calculator.html , login_form.html , give_words.html , and run_python.html .
        Python code calculate.py , Python code login_form.py , Python code give_words.py , and Python code run_python.py .
L-23 Fri 5 Mar 2010: dynamic web pages -- web interfaces to Python code (printer friendly version )
        Python code use_forms.py , web_det.py , and compute_det.py .
L-24 Mon 8 Mar 2010: database programming -- an open source database MySQL -- MySQLdb (printer friendly version )
L-25 Wed 10 Mar 2010: working with MySQL -- Python scripts using MySQLdb (printer friendly version )
        Python code grabpyhead.py , listpyfields.py , filldb.py , and viewdbdata.py .
L-26 Fri 12 Mar 2010: accessing a database from a Python script -- building a GUI for a database (printer friendly version )
        Python code guidb1.py , normdb.py , and guidb2.py .
L-27 Mon 15 Mar 2010: computer networks -- client/server interactions -- the socket module in Python (printer friendly version )
        Python code tcp_server.py , Python code tcp_client.py , dealer.py , and player.py .
L-28 Wed 17 Mar 2010: sockets for communication between programs -- pleasingly parallel computations (printer friendly version )
        Python code remote_server.py , remote_client.py , talk_host.py , talk_client.py . mc4pi2.py , and mc4pi_client.py .
L-29 Fri 19 Mar 2010: web interfaces for database servers -- combining CGI scripts, MySQLdb, and sockets (printer friendly version )
        Python code scripts_count.py , scripts_client.py , scripts_server.py , scripts_web.py , scripts_servdb.py , scripts_showall.py , scripts_sortdb.py , scripts_sort.py , and scripts_sortall.py .
L-30 Fri 29 Mar 2010: introduction to multithreading -- using the thread module -- the Thread class (printer friendly version )
        Python code hello_threads.py , hello_threading.py , classproducer.py , classconsumer.py , and prodcons.py .
L-31 Wed 30 Mar 2010: managing data between threads -- locks and synchronization -- bulding simulations (printer friendly version )
        Python code fastfood.py , taketurns.py , and restaurant.py .
L-32 Fri 2 Apr 2010: multithreaded servers -- sockets and threads -- handler threads to serve requests (printer friendly version )
        Python code mtserver.py , mtclient.py , and mtnserver.py .
L-33 Mon 5 Apr 2010: advanced web programming -- the SocketServer module -- a basic HTTP server (printer friendly version )
        Python code clockserver.py , clockclient.py , fork.py , clockforkserver.py , clockforkclient.py , and ourwebserver.py .
L-34 Wed 7 Apr 2010: web clients and crawlers -- using the urllib and urlparse modules (printer friendly version )
        Python code copywebpage.py , scanquotes.py , scanhttplinks.py , and webcrawler.py .
L-35 Fri 9 Apr 2010: advanced CGI scripts -- using cookies for personalized web browsing (printer friendly version )
        Python code cookie_counter.py , cookie_login.py , and cookie_userpass.py .
L-36 Mon 12 Apr 2010: an application: web server to a database -- parsing HTML files (printer friendly version )
        HTML file uploadfile.html
        Python code uploadfile.py , tallytags.py , and htmlrefs.py .
L-37 Wed 14 Apr 2010: review of the lectures 21 to 35
        Answers to question (1): show_hello_world1.html , show_hello_world1.py ,
        Answers to question (2): show_hello_world2.html , show_hello_world2.py .
        Answers to question (3): show_hello_world3.py .
        Answers to question (4): tempdbcreate.txt , tempdbadd.py , tempdbinsert.txt , tempdbtuples.py , tempdbtupins.py , tempdbselect.txt , tempdbqueries.py .
        Answers to question (5): pass_server.py .
        Answers to question (6): randomwords.py , conversation.py .
        Answers to question (7): pass_mtserver.py .
        Answers to question (8): lookforpyfiles.py .
        Answers to question (9): cookie_date.py .
L-38 Fri 16 Apr 2010: questions for the second midterm exam, with answers .
        Python scripts for the answers: ex2q1.py, ex2q2.py, ex2q3.py, ex2q3_client.py, and ex2q4.py.
L-39 Mon 19 Apr 2010: the meaning of Python -- its relation with C/C++ and Java -- Cython (printer friendly version )
        Python script: powermethod.py
L-41 Fri 23 Apr 2010: review of the first 18 lectures
Because of furlough, no class on Monday 26 April. (replacement activity: project 6)
L-43 Wed 28 Apr 2010: review of the material between midterm exams

Final Exam: Monday 3 May 2010, 1:00PM-3:00PM, in Burnham Hall 208.