Overview
This week we will develop our skills to write functions in Python and how to use doctest and TDD to develop them.
Thursday, September 25th
Classwork
Today in class we will share presentations of the doctest exercises for which we signed up last class.
Homework
Complete the exercises from Chapter 5 Excercise Set 5: PCEP Practice in preparation for a quiz at the beginning of class on Monday.
Monday, September 22nd
Classwork
We will begin class today with a discussion of how to trace the execution of a program using pencil and paper. We will strongly recommend (insist, really), that you begin doing this on your quizzes from now on.
Chris will introduce us to Python Tutor, an online resource that can help you learn this process.
We will then form pairs and choose exercises from Chapter 5 Exercise Set 1: Doctest and Chapter 5 Exercise Set 2 to present in class on Thursday.
This will be a graded assignment using this presentation grading rubric.
Pairs
- Owen and Isaac:
compare
andencapsulation
- Tai-Yu and Kidus:
hypotenuse
- Jackson and Korben:
slope
- Clara and Kendly:
is_even and is_odd
- Roey and Keamlak:
is_factor
andprint_digits
- Madi and Gabriel:
num_even_digits
- Yara and Adam:
gcf
Homework
Complete all the exercises in Chapter 5 Exercise Set 5: PCEP Practice in preparation