OO Programming and Data Structures | CS 241

01 Prepare : Reading

Overview

For most weeks, the preparation material will consist of reading chapters from the textbook. This week, however, is a little different because we will be getting set up with the CS Department Linux system and then learning the basics of Python from Web sources.

The Internet is your Textbook

The assignments this week (and in future weeks) will build primarily on topics presented in the preparation material. However, they will also require additional knowledge found outside this material. This is by design. The purpose of this is to help you develop the skills to learn how to learn new things on your own. This is essential for programming in the workplace.

Before asking for help from a TA or a teacher, you should try to "Google it" on your own. As you are getting started, it might seem a little intimidating, so don't hesitate to also ask for help. But as time goes along, you should find yourself becoming more an more independent at finding solutions.

Tasks

Your main preparation tasks for the week are:

  1. Get set up with the CS Department Linux System

  2. Learn the basics of Python

Get set up with the CS Department Linux System

We will use the CS Department Linux system for 2 main purposes: 1) to learn the basics of Linux commands and 2) to submit Python programs.

In the past, the department has maintained a physical lab of computers for students to use and work with Linux (affectionately known as "The Linux Lab"). In order to accommodate many more students, both online and face-to-face, the department will still provide Linux servers, but students will now log into them remotely from their laptops.

The way you remotely connect to the lab is different depending the type of computer you have. Please refer to the following link for information on configuring your specific system: Linux Lab Remote Access.

Instructor Tip:

For those that have used the Linux system previously, please be aware that a few changes have been made recently:

The IP address range has changed to 157.201.194.201-210 (it was formerly 201-235). If you use emacs with a client that passes through the graphics (e.g., Moba or Mac with the -X switch), it will open up a graphical version of emacs on your local system. This may be what you want, because it allows for use of the mouse, etc. But if you are away from campus, it will likely be very delayed. If you want to force emacs to open in the regular "console" way, you can use the "-nw" switch for "no window", such as: emacs -nw assign01.cpp .

Because the physical lab systems have changed, if you have previously connected to one of the systems in the 201-210 range, your computer will have remembered its fingerprint in it's known hosts list. Because the fingerprint has now changed, you will get a security warning, and will not be able to connect to it. This can be resolved by removing that line from your known hosts file or by picking a different IP address to which you have not previously connected.

Learn the Basics of Python

This semester we will be using the Python programming language. If you have programmed in Python previously, this material will be a review for you. If you have not, it will help you come up to speed.

We will use the online textbook at: Runestone Academy

For this week, please read at least the following sections:

As you are going through each section, take a minute to play with the code in their interactive sections. Also, if you are feeling a little uncomfortable with the topics above, please dig deeper into the topics before and after each one.

Python 2 vs 3

Be aware that some Python code (such as sites like Codeacademy and many other examples one the Internet) is written for Python 2. The testBed and our textBook use Python 3. For the most part these versions are very similar, but there are a few differences. Mostly notably, you will encounter early on that in Python 2, the print statement does not need parentheses, whereas in Python 3 it does:


print "CS 241" # Python 2

print("CS 241") # Python 3

Additional Python Help

The Internet contains many great Python tutorials and references. The Python 3 Tutorial from the official Python documentation is actually quite good at systemically going through the various elements of the language.

Submission

You will demonstrate your preparation by taking by completing two checkpoint assignments.