Assignments for April 23

Python: Using IDLE (so you can save the running output to a file), do the following:

  1. Assign your last name to a variable and have it print it.
  2. Using a for loop, print out the letters in your last name from that variable.
  3. Build a list (they use []) of five items, saving it to a variable. Then access the fourth element. Remember, list counting starts at 0.
  4. Import the urllib library, connect to this GW press release using the urlopen() function and read the contents of the page, saving them into a variable called html. Print out the contents of html.
  5. Save the IDLE session as a file and email it to me.
  6. Readings: USA Today on college athlete’s majors, Check out Oakland Crimespotting and EveryBlock.

Advertisements

About this entry