DS4UX (Spring 2016)/Day 7 coding challenge: Difference between revisions
(Created page with "<div style="font-family:Rockwell,'Courier Bold',Courier,Georgia,'Times New Roman',Times,serif; min-width:10em;"> <div style="float:left; width:100%; margin-right:2%;"> {{Link/...") |
No edit summary |
||
Line 1: | Line 1: | ||
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 == | == Challenges == | ||
1. Using <code>challenge01_traffic_getMonthToll.py</code>, 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 <code>challenge02_traffic_writeYearToll.py</code>, 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 <code>challenge03_wiki_theMostRevised.py</code>, write a function called theMostRevised() which receives a list of keywords and return the most highly revised keyword in Wikipedia. | |||
Latest revision as of 22:01, 9 May 2016
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.