Governor's Career & Technical Academy Arlington

CSC 221 Weekly Assignments: Week 8

CSC 221


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

  1. What is binary code?
  2. 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?

  1. __ 4 - 3 // 2 - 3
  2. __ 1 ** 2 - 7 // 3
  3. __ 4 / 2 + 2 ** 0
  4. __ 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.

Homework

Read Strings, lists, and tuples from Beginning Python Programming for Aspiring Web Developers and complete Exerise Set 0: Chapter Review.