Overview
This week we will take a deep dive into strings in Python, and also learn about writing automated tests for our programs using doctest.
Thursday, October 19th
Daily PCEP Warm Up Questions
- What is binary code?
- What program do you need to run code given in a source file whose name
has a
.py
extention?
Classwork
We will begin class with a short quiz on Lesson 7: Strings. After the quiz we will discuss today's PCEP warm up questions, and then I will introduce you to doctests.
Homework
Complete Chapter 2 Exercise Set 1: Introducing Doctest and Chapter 3 Exercise Set 1: Doctest Exercises.
NOTE: Please pay attention to the format of these homework questions. It is very likely you will see these formats again soon on upcoming quizzes.
Tuesday, October 17th
Daily PCEP Warm Up Question
Which of the following expressions evaluate to a zero result?
- __ 4 - 3 // 2 - 3
- __ 1 ** 2 - 7 // 3
- __ 4 / 2 + 2 ** 0
- __ 2 // 5 * 3 ** 4
Classwork
Today in class we will discuss Dr. Chuck's lectures on strings assigned for homework and then talk about how Python strings are one of Python's three sequence types.