DS4UX (Spring 2016)/Day 7 coding challenge

From CommunityData
Revision as of 22:01, 9 May 2016 by Jtmorgan (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Each of the challenges this week will ask you to modify and work with code in the Week 7 lecture project dataset which you should have installed and begun working with in class.

As always, it's not essential that you solve or get through all of these — I'm not grading your answers on these. That said, being able to work through at least many of them is a good sign that you have mastered the concepts for the week. It is always fine to collaborate or work together on these problem sets.

Challenges[edit]

1. Using challenge01_traffic_getMonthToll.py, write a function called getMonthToll which returns monthly toll from bgt_traffic dataset, Parameters: string of a month and a year (e.g., month = “07”, year = “2014”). Return type: integer of total toll for the month. You may use “getDayToll()” to get monthly toll.

2. Using challenge02_traffic_writeYearToll.py, Code challenge activity #2. Write a function called writeYearToll which saves monthly toll of a given year. Parameter: a string of year (e.g., “2014”) (e.g., "2014“ makes “2014.csv” and save a string like: “06/01, xxxx \n 02, xxxx\n … 12, xxxx").

3. Using challenge03_wiki_theMostRevised.py, write a function called theMostRevised() which receives a list of keywords and return the most highly revised keyword in Wikipedia.