A solution to last week's challenge can be found here.
Marie lives in Toronto (Canada). As soon as the weather permits it, she will take her bike to go to work. Her workplace is about 15 km away from her home if she drives her car and 12 km if she bikes.
On Tuesday and Thursday, Marie works remotely. On Monday, Wednesday and Friday, she has to go to her workplace.
When the temperature gets to 28 degrees, she will drive to work.
Use the dataset to find out:
- How many days of biking and driving Marie has done over April, May, and June 2021
- How many kilometers of biking and driving Marie has done over April, May, and June 2021
Use the “Max Temperature” information provided in the data set.
For this challenge, 2 solutions will be posted next week.
Here is my solution!
I do have a couple concerns about the logic of when she'd ride her bike verses drive. For example, a Max temp of 4.7 degrees means that it will reach that temp around 3pm, but her morning commute would actually be around -4.2 degrees. We are also completely ignoring days when its rainy or that have wind speeds in excess of 40 kmph.