Grace Hopper Center

CSC 221 Weekly Assignments: Week 2

CSC 221


Overview

This week we will begin Chapter 2: Values, expressions and statements in our online textbook. By the end of this chapter, you should be comfortable interacting with the Python interpreter in both shell mode and script mode. You will also need to begin getting comfortable using the Unix CLI and a console text editor (nano will work fine at this stage), so be sure to begin practicing if you can't yet do those things.

Thursday, September 4th

Classwork

During class today we will discuss the solutions to the homework assigned on Tuesday, and then learn how to use the doctest module to write automated tests.

I will be using doctests frequently on quizzes as a way to assess your understanding of Python.

Finally, I'll show you how to add a .vimrc file to your home directory which will begin to turn vim into a nice Python IDE.

Homework

Prepare for your first test on chapter 2 at the beginning of class next Monday (the 8th) by completing the exercises in Exercise Set 1: Introducting Doctest. Four of the five questions on the quiz will be variations of these exercises.

Tuesday, September 2nd

Classwork

Only eight of you sent us the emails assigned last week. I realize that the way we divided the class may have caused some confusion, so those of you who did not email us do not have the E that would normally be given, but if you do not email us by 11:59 pm this evening, you will tomorrow. We'll use this opportunity to talk about why submitting assignments on time is so crucial to the workflow we need in this course, and why late work will thus not be accepted.

If you take a look at the Students page, you'll see that eight students have already sent me links to their git repos. That's a healthy amount, and in keeping with the collaborative learning environment we want to create in here, we'll form small groups of one or two of you who have never used git before paired with one of you who has. After we finish that activity, please email me ASAP with your repo url!

Next we will go through the first six sections of Chapter 2: Values, expressions and statements in our textbook, running many of the examples and summarizing many of the key ideas presented in these sections.

By the time we finish reading this chapter, you should become familiar with the following terms, and be able to provide a rough definition of them:

data, value, data type, class, bit, int, str, float, '\n', Python shell, Python script, expression, operator, operand, assignment statement, assignment operator, modulus operator, converter functions, input function, print function

We will also walk you through the begining of Exercise Set 1: Introducing Doctest to get you started with this wonderful tool.

In the time remaining, you can begin working through the assigned exercises.

Homework

If you haven't already done so, read Chapter 2: Values, expressions and statements in our online textbook. Remember, you are a college student now, so you should be reading for understanding. You can test your understanding by seeing how easily you can complete some of the exercises in Exercise Set 0: Chapter Review. I'll show you in class where you can look for solutions to these exercises.