Lab exercise:
Now in the empty editor window type the following:
#! /usr/bin/python print "hi!"Click on the "Save" command in the editor toolbar, using "hello.py" as the file name, and click on the "Save" button.
Quit the editor (using File->Quit or click on the x in the upper right corner of the editor window.)
Back in your terminal window, type the following command
chmod u+x hello.py
Now type in the command
./hello.py
If successful, you should see
hi!
appear in the terminal window.
Congrats! You have just successfully written and executed your first python program for the course!
Introduction to the CS laboratory
This account is completely seperate from any other VIU computing accounts you may have.
In the labs on January 12th you will each be given your account userid (usually part of your surname and some initials) and a password, along with the departmental policies on use of computer accounts.
It is important you read these policies and understand your responsibilities with respect to use of your account.
Later in the semester you will probably also be given access to the machines in lab 115 (across the hall from 102).
To get into the lab rooms outside of regular class hours you
will need a programmed card key.
Instructions to set up your card key are given here.
Use the userid and password provided on the account sheet given to you by the course instructor.
1. Enter your user id and hit enter
2. Enter your password and hit enter
When you are typing your password the cursor symbol
won't move in the password box, so it looks like nothing is
happening. Enter your password anyway, and hit return.
To do so, we need to open a command shell (a.k.a. command window, terminal window, etc).
To open a command window:
This will prompt you to enter your old password, then (assuming you entered your old password correctly) it will prompt you for a new password and will ask you to retype your new password to confirm it.
This will update your password on all CSCI machines.
If you have forgotten your password, please go to the IT Help Desk on the ground floor of the library and present your student card, and they will be able to send a request to IT services that automatically resets your password.
Introduction to linux and bash
The machines in lab 102 connect you to a (shared) linux server named csciun1.mala.bc.ca.
CSCI students and faculty can each connect to this server from a variety of locations (including connecting from home).
Each person has their own account, with its own directory (folder) of files and subdirectories.
Whenever you log in to the server you will automatically begin in your account's directory.
You have the ability to create and edit files within your account's directory, as well as create other subdirectories inside it to keep your files organized. (It can get awfully cluttered if you keep all of your files in just one big collection.)
Aside: Whenever you type in a command in a terminal window, or whenever you click/doubleclick on items in the visual interface, your commands get interpretted by a command shell. The particular command interpretter being used on csciun1 is called bash. |