Intro to Python

Lab – Intro to Python

With this lab, we will make our first foray into programming with Python.  This will require you to either:

  • log into the Room 1411 computers under the Linux operating system, OR
  • install  the free Miniconda distribution of Python on your own laptop.  Be sure to get version 2.7, not 3.5!

I strongly recommend installing a Python distribution on your own laptop for two reasons:

(1) it will allow you to work with Python anywhere, not just in 1411, and

(2) it will free up computers in 1411 for those who cannot install Python on their own laptop for any reason (e.g., they don’t have one).

Pete or I can help, if needed, with installing Miniconda on your laptop.

Depending on the size of the class and how many use their own laptops, we may have to pair students up on the computers.  If so, I’m not particularly concerned at this point about how you divide up the labor — ideally, each of you should get some direct hands-on experience in class with editing and running the python program, but this will have to be while logged in under one student’s account.  I
suggest that you work together to get a working copy of the program going;
then print out a copy of the program for the other student to manually
enter and run under their own account between now and next Friday.

Here are additional resources that will be necessary or useful for this lab.

Lab exercise

I or the TA will walk through the following steps in class

  • View the structure of the sounding file using a suitable a text editor such as emacs or gedit.
  • Start jupyter notebook in a browser.
  • Load and rename the template notebook file
  • Insert executable python code following the commented instructions in the notebook file.
  • Print out and turn in two plots.