Session Details
Week 2,
Session 5 — Tue Mar 16
Reading
-
4.1-4.5
(28 pages)
HW Due
-
HW 4
Programming part of HW 4 is due Wednesday at noon; other parts due today (Tuesday)
Topics
-
A software development exercise: Analyze, Specify, Design, Implement, Test, Maintain
-
Character String operations, encodings
-
String formatting using %
Outline
-
[10 min] Hand-back quizzes, discuss questions, do review question on Lists.
-
[15 min] Software development class exercise, the Month-Day problem
- Analyze the problem
- Determine the specifications
- Create a design
- Implement the design
- Test/debug the implementation
- Maintain the software
-
[7 min] Strings
- Representing Strings: the ord and chr functions
- Encodings: ASCII, extended ASCII, Unicode
- Formatting with the % operator
-
[3 min] The input and raw_input functions
-
[5 min] File open, close, read, write
-
[15 min] Exercise on writing to and reading from files
-
[5 min] Break
-
[35 min] Go, Robot, Go! exercise
-
[10 min] Begin homework
Resources
-
Slides: Strings and Files
HW Assigned
-
HW 5