Computer Science 203:

Software Engineering

Gregory M. Kapfhammer

Color Scheme

Key Concept

Corresponding Diagram

In-Class Discussion

In-Class Activity

Details in the Textbook

Think Python

Chapters 5 through 8

Hands-on Practice on Fridays

Reviewing Python Fundamentals

Chapter 5

Conditionals and Recursion

Python Programs

Mathematical expressions

Boolean expressions

Logical operations

Conditional execution

Conditional logic

How are Python and Java the same?

How are Python and Java different?

Recursive functions

Chapter 6

Declaring and Calling Functions

One or More Return Values

Optional function arguments

Default values for function arguments

How are Python and Java the same?

How are Python and Java different?

Incremental development

Function composition

Function interfaces

Function debugging

Debugging

Precondition violated: arguments are incorrect

Postcondition violated: function is incorrect

Return value misused: calling function is incorrect

Chapter 7

Iteration

Achieve repetition

while loops

for loops

for each loops

Which approach is "Pythonic"?

Debugging iterative programs

Chapter 8

Strings

Strings are sequences

Strings are immutable

Strings can be "traversed"

while loops

for each loops

in operator

Application to the software project