Assignments for April 23
Python: Using IDLE (so you can save the running output to a file), do the following:
- Assign your last name to a variable and have it print it.
- Using a for loop, print out the letters in your last name from that variable.
- Build a list (they use []) of five items, saving it to a variable. Then access the fourth element. Remember, list counting starts at 0.
- 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.
- Save the IDLE session as a file and email it to me.
Readings: USA Today on college athlete’s majors, Check out Oakland Crimespotting and EveryBlock.
About this entry
You’re currently reading “Assignments for April 23,” an entry on Computer-Assisted Reporting
- Published:
- April 17, 2009 / 9:10 am
- Category:
- Assignments
- Tags:
No comments yet
Jump to comment form | comments rss [?] | trackback uri [?]