CS 4950 Spring 2017

Lab 6

Find a computer and log into the OSX side using your CS login name and password.

Open Firefox and find the class web page.

Open TextWrangler - use the finder window and go to applications.
Open a new text file, called Lab6.txt, to record your work today - you will paste in some of your command lines. The header of the file should look like:
Your Name
CS 4950
Lab 6
April 5, 2017


Find the Terminal - use the finder window and go to applications and then utilities.

We will start by writing the molecular weight program on page 156.
The first step is to create the dictionary of molecular weights:
Once you have the dictionary created, iterate through it with a for loop to compute the molecular weight of a given string.  You might want to experiment with some strings of your own.
You can follow the example at the top of page 157.
Cut and paste your program and the results of running it into your Lab5.txt file.

Now that you have a dictionary, lets experiment with some of the functionality available for dictionaries:
Here are some things we would like to do with lists:
Again, cut and paste you command lines and output, and any programs you write into Lab5.txt


Viewing HTML Source on different browsers

To be able to view the source code of a webpage under Safari, you first need to enable the Developer menu:
  1. Click on Safari menu > Preferences > Advanced.
  2. Check "Show Develop menu in menu bar".
  3. Close the Preferences window.
  4. Go to the Develop menu > Show Page Source.
ccm.net/faq/33026-safari-view-the-source-code-of-a-webpage

For Chrome: View -> Developer -> View Source

For Firefox: Command-u


Turn it in:
Go to the CS Homework Submission System: https://www.cs.csustan.edu/cshomework/
Choose: instructor Martin
              Spring 2017
              CS4950
              Lab6
Upload the your Lab6.txt file as prompted.