Editing DS4UX (Spring 2016)/Day 7 coding challenge

From CommunityData
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
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.
<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/Graphic/Main/2
|highlight color= 27666b
|color=460c40
|link=
|image=
|text-align=left
|top font-size= 1.1em
|top color=FFF
|line color=FFF
|top text=This page is a work in progress.
|bottom font-size= 1em
|bottom color= FFF
|bottom text=
|line= none
}}</div></div>
 
<!--
Each of the challenges this week will ask you to modify and work with code in the [[DS4UX_(Spring_2016)/Baby_Names|Baby Names]] 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.
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.




Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)