Course Content

The text books for this course are

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

L-1 Mon 14 Jan 2008: welcome to mcs 275 (printer friendly version )
        Python programs enumdivs.py and facnum.py
L-2 Wed 16 Jan 2008: 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 18 Jan 2008: arrays and matrices (printer friendly version )
        Python code sieve.py , findmin.py , and saddle.py .
L-4 Wed 23 Jan 2008: 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 25 Jan 2008: graphical user interfaces (printer friendly version )
        Python code billiards_basic.py (a very basic GUI) and with more features: billiards.py .
L-6 Mon 28 Jan 2008: recursive problem solving (printer friendly version )
        Python code factorial.py and palindromes.py
L-7 Wed 30 Jan 2008: recursive drawings (printer friendly version )
        Python code multigon.py , cantor.py , koch.py , and flake.py .
L-8 Fri 1 Feb 2008: recursion versus iteration (printer friendly version )
        Python code hanoi.py and fibonacci.py .
L-9 Mon 4 Feb 2008: enumeration and backtracking (printer friendly version )
        Python code enumbits.py , enumwords.py , enumwstop.py , and knapsack.py .
L-10 Wed 6 Feb 2008: recursive data structures (printer friendly version )
        Python code treesort.py and treezoo.py .
L-11 Fri 8 Feb 2008: traversing binary trees (printer friendly version )
        Python code classtree.py and mousedraw.py .
L-12 Mon 11 Feb 2008: divide and conquer (printer friendly version )
        Python code findsecret.py , binarysearch.py , bisectsearch.py , and bisection.py .
L-13 Wed 13 Feb 2008: merge and quick sort (printer friendly version )
        Python code selectsort.py , mergesort.py , and quicksort.py .
L-14 Fri 15 Feb 2008: stacks of function calls (printer friendly version )
        Python code evalpostfix.py , gcdstack.py , facstack.py , and fibstack.py .
L-15 Mon 18 Feb 2008: from recursion to iteration (printer friendly version )
        Python code qsarray.py , hilbert.py , and turtle.py .
L-16 Wed 20 Feb 2008: review for the first midterm exam
        Python code for answers to selected questions: question 1: power.py , question 3: recstrlen.py , question 4: reccharcnt.py , question 5: recrevlist.py , question 7: chebiter.py , question 8: maxtrip.py , question 9: travdisk.py , question 11: hfilling.py .
L-17 Fri 22 Feb 2008: questions for the first midterm exam, with answers .
L-18 Mon 25 Feb 2008: CGI programming . (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 .
Lab session of Tue 26 Feb 2008: Python session with NumPy/SciPy.
L-19 Wed 27 Feb 2008: Server-Side Scripting. (printer friendly version )
        HTML files calculator.html , login_form.html , give_words.html , and run_python.html .
        Python code calculate.py , login_form.py , give_words.py , and run_python.py .
L-20 Fri 29 Feb 2008: dynamic web pages (printer friendly version )
        Python code use_forms.py , web_det.py , and compute_det.py .
L-21 Mon 3 Mar 2008: database programming (printer friendly version )
L-22 Wed 5 Mar 2008: working with MySQL (printer friendly version )
        Python code grabpyhead.py , listpyfields.py , filldb.py , and viewdbdata.py .
        File archive MCS275py.tar.gz of Python programs (do gunzip and tar xpf to extract).
L-23 Fri 7 Mar 2008: interfacing with MySQL (printer friendly version )
        Python code guidb1.py , normdb.py , and guidb2.py .
L-24 Mon 10 Mar 2008: network programming (printer friendly version )
        Python code tcp_server.py , tcp_client.py , dealer.py , and player.py .
L-25 Wed 12 Mar 2008: using sockets (printer friendly version )
        Python code remote_server.py , remote_client.py , talk_host.py , talk_client.py , mc4pi2.py , and mc4pi_client.py .
L-26 Fri 14 Mar 2008: web interfaces for database servers (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-27 Mon 17 Mar 2008: introduction to multithreading (printer friendly version )
        Python code hello_threads.py , hello_threading.py , classproducer.py , classconsumer.py , and prodcons.py .
L-28 Wed 19 Mar 2008: locks and synchronization (printer friendly version )
        Python code fastfood.py , taketurns.py , and restaurant.py .
L-29 Fri 21 Mar 2008: multithreaded servers (printer friendly version )
        Python code mtserver.py , mtclient.py , and mtnserver.py .
L-30 Mon 31 Mar 2008: advanced web programming (printer friendly version )
        Python code clockserver.py , clockclient.py , and ourwebserver.py .
L-31 Wed 2 Apr 2008: web clients and crawlers (printer friendly version )
        Python code copywebpage.py , scanquotes.py , scanhttplinks.py , and webcrawler.py .
L-32 Fri 4 Apr 2008: advanced CGI scripts (printer friendly version )
        Python code cookie_counter.py , cookie_login.py , and cookie_userpass.py .
L-33 Mon 7 Apr 2008: an application (printer friendly version )
        HTML file uploadfile.html
        Python code uploadfile.py , simplecgiserver.py
L-34 Wed 9 Apr 2008: review of lectures 18 to 33
        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-35 Fri 11 Apr 2008: questions for the second midterm exam, with answers .
L-36 Mon 14 Apr 2008: algorithms and data structures (printer friendly version )
        Python code class_set.py .
L-37 Wed 16 Apr 2008: performance analysis (printer friendly version )
        Python code time_iftry.py , time_sin.py , time_filework.py , and time_listcomp.py .
L-38 Fri 18 Apr 2008: parsing HTML (printer friendly version )
        Python code tallytags.py , htmlrefs.py , pdfclassfiles.py , and boldtext.py .
L-39 Mon 21 Apr 2008: Game Trees (printer friendly version )
        Python code classboard.py , classboardtree.py , and gametree.py .
L-40 Wed 23 Apr 2008: Working with Graphs (printer friendly version )
        Python code drawgraph.py and searchgraph.py .
L-41 Fri 25 Apr 2008: Pattern Matching (printer friendly version ).
L-42 Mon 28 Apr 2008: review of the first 15 lectures
L-43 Wed 30 Apr 2008: review of lectures 18 to 31
L-44 Fri 2 May 2008: comprehensive review.

The final exam is in 208 BH on Thursday 8 May from 8:00 to 10:00AM.