Post date: Sep 22, 2011 6:23:0 PM
Announcements
Reminder: The Quiz 'Chapter 5, Part 2: Sequences' is due tonight on D2L (the quiz will dissapear at 10:00 pm)
Project 3 all due next Monday @ 9:00 pm
Homework
If necessary, complete Chapter 5 Part 2 Quiz
Work on Project 3
Lecture Outline
There will be no new Python topics today!
Today will will focus on problem solving
Analyze the problem: Study it, Read it, Understand it,
To test our understanding, derive test cases as example function calls and the expected return result
Consider the addSuffix problem
Need to refer to Suffixes page
Collaborative leaning. Form teams of 3, write your name on the handout
far_near
Code it in Python
Problem 1: because it is really hard to determine what Nick wants: close_far
Fill in at least 5 test cases
Write function by hand
Volunteers code it up front
Problem 2: Maybe hard to understand make_bricks
Analyze the problem and fill in at least 5 test cases
(during lecture we came up with these, thanks to ISTA 130 students)
def make_bricks(small, big, goal):
make_bricks(_3__, __1__, _8__) ->__True___
make_bricks(_5__, __1__, _10_) ->__True__
make_bricks(_3__, __1__, _9__) ->_False____
make_bricks(_1__, __1__, _5__) ->_True____
make_bricks(_3__, __2__, _9__) ->__False___
make_bricks(_0__, __0__, _0__) ->__True____
make_bricks(_0__, __0__, _1__) ->__False___
make_bricks(_0__, __15_, _15_) ->__True____
make_bricks(_15_, __0__, _15_) ->__True___