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 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.
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.
Finally, we will learn how to really code. We are going to be using a programming language called Python this semester.
Create a directory called lab1
in your labs
directory. All of the code you create today should go in the
lab1
directory.
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.