Data Structures - Lab 01

Tuesday, August 25th

Objectives:


Introduction

Today's lab will start with about 45-60 minutes of lecture/demonstration/review regarding python.  It is designed to give some language background to those who didn't learn python in CS I, but also to reinforce some things for those who did.  My notes for what was done in that portion of the hour can be found here.

After that, I will ask you to log on to the computers and write a couple of simple functions mostly to confirm that your account works still and that you can write some BASIC python code.

Finally, I will ask you to submit these methods to confirm that the homework submission system works for you.


Part A: Logging on and Setting up

Logging on to the CNS network (should work in Wrt 112, Wrt 339, and ITTC 335)

  1. Locate a free computer

  2. The computers in this lab are “dual boot” - that is, they run both Windows and Linux. We will be using the Windows side of things. If you happen to sit at a computer that is booted into Linux then you will need to reboot the machine into Windows

  1. Once you are sitting at a computer that is booted into Windows, you will need to log on:

Creating a directory for this class

  1. Open up the graphical representation of the computer by selecting "Start | My Computer "

  2. Select (double click) on the icon for the network drive named “Math-CS” that should be towards the bottom of this window.

  3. When this drive opens up notice that the address field says “P:\” For this reason I will refer to this as the “p drive” (tricky, I know!)

  4. Select the icon labeled “810:052-Python” This is the directory for this course.

  5. Select the icon for the folder labeled with your username.

  6. Create a new folder in your root directory (the one with your id as a name) and give it the name "lab1".  You can do this by right clicking in the empty area and selecting “New | Folder” and then renaming the folder that is created.


Part B: Programming with IDLE

During this course you will use IDLE as your python shell.  IDLE stands for Integreted DeveLopment Environment.  It is a stripped down environment but it will do what we need it to do most of the time. 

Launch IDLE by selecting "Start | All Programs |  Programming | Python | IDLE (Python GUI)"

Once IDLE is running, open an editor window (Select "File | New Window")

In this new editor window define the following six simple methods and save this to the  lab1 folder you just created on the P drive  in a file called lab1.py  Make sure you test these methods to confirm they work as expected

 

 


Part C: Submitting your work using the submission system

This semester you will use an electronic submission system to send me any code you complete in lab or a programming assignment.

Make sure that you understand my homework collection policies.

To upload your homework, log on to the homework submission system at:

(you can always link to the submission system by visiting the resources page for this class)

It is VERY likely that you will get some security certificate warnings when trying to use this.  You may add an exception and accept the existing security certificate.

Follow the directions in this system to upload lab1.py that you just created.


Finishing Up

At this point you should be done.  If you are done before the end of the lab section you are free to leave early.  If you do not finish in time, you have until the start of class on Wednesday to finish up.

Do not forget to “log off” of the machine you are working on.