CPSC 120 B




Lecture
MWF 10:50am - 11:50am
Lab
MWF 12:00pm - 1:00pm

Scotty Smith

Office
Trexler 365-B
Office Hours
Monday / Thursday
3:00pm - 5:00pm
Email
chssmithATroanoke.edu

< Back
Printable Copy

Lecture 2

Linux Overview


In-class Activity 1

Command Line Interface

From the terminal, setup your home directory so that it looks like the folowing:

Note that username is your home directory, the directory that is the same name as you used to log in. The directories Desktop, Documents, Downloads, Music, Pictures, Public, Templates, and Videos already exist and you do not need to modify them. The directories cs120, activities, labs, and assignments, do not exist, so you need to create them.

Under your activities directory, create a lecture2 directory. You will place the rest of your activites for this lecture in this directory.


Emacs

Emacs is a command line text-editor. For this course, you will be using Emacs extensively. An emacs reference is provided for you on the course website.


In-class Activity 2

Create a file called activity2.txt in your lecture2 directory. Put your answers to the Review Questions from the linux overview linked above in this text file.


Python (Finally!)

Finally, we will learn how to really code. We are going to be using a programming language called Python this semester.


TuringCraft Setup

Turingscraft Homepage

TuringCraft Section Access Code: ROANOK-2840-0

Lab Assignment 1

Linux and Python

Create a directory called lab1 in your labs directory. All of the code you create today should go in the lab1 directory.

Classmates

In Emacs create a python program in a file called classmates.py. The program should print something like the following:

    Name        Hometown    Intended Major      Age
    ====        ========    ==============      ===
    Sally       Roanoke     Computer Science    18
    Alexander   Washington  Math                19

Except the lines with Sally and Alexander's information should be replaced with your and your lab partner's information. Also add two more lines with information about two classmates sitting near you. The program should not use spaces to align columns. Instead use the tab character, "\t".

Create a tar file of your lab1 directory. You can do this by first navigating to your labs directory, using the cd command. Then, issue the following command.

tar czf tarfilename.tgz lab1/

To submit your activity, go to cseval.roanoke.edu. You should see an available assignment called Lab Assignment 1. Only one of your pair should submit your activity. Make sure both partners are listed in the header of your file.


Last modified: Fri Aug 30 10:23:10 EDT 2013