------------------------------------------------------------------------------
MC logo
Code Examples
[^] CSc 232 Python, Fall, 2007
------------------------------------------------------------------------------

Here are links to the Python code discussed in lecture.

Basic Data Types
o Hello, World!
o Simple Numeric Computation
o Strings I
o Strings II
o Strings Operations
o Lists
o List Operations
Control Construct Basics
o If Statement
o While Loop
o For Loop I
o For Loop II
o Comparison and Boolean Ops
o Break and Continue
Control Construct Examples
o Copy Input to Output I
o Copy Input to Output II
o Copy Input to Output III
o User Lister
Exceptions
o Exceptions I
o Copy Input to Output IV
Functions
o Function Definition I
o Function Definition II
o Functions, Parameters, and Globals
o Polynomial Evaluator
More Data Types
o Del Operator
o Tuples
o Dictionary Objects
o Sorted User Lister
More I/O
o Output Formatting
o Reading Files
Modules and Classes
o Sorted User Lister II
o Polynomial Module
o Polynomial Evaluator II
o Account Class
o Account Class Driver
System Services
o Misc. System Facilities
o OS Path Facility
o Report Logged-On Users By Name
o Find GIF files
TkInter I
o A Useless Button
o A Colorful, Useless Button
o An Objective Useless Button
o Better Color
TkInter II
o Host Name Lookup
o Host Name Lookup 2
o Calculator
o FTP Download Client
CGI Examples
o Print Some HTML
o Your Fortune
o Simple Form Handler
o Guessing Game
o Cheat-Proof Guessing Game
CGI Form
o Survey
o Survey Adder
o Survey Reporter
o Survey Utility Module
o Survey Def. File
CGI Utilites
o Utility Module
o CGI File Dumper
o Environment Lister
o Old-Fashoned Hit Counter