This challenge didn't require code. It did however require me to re-type this entire message because TextMate decided CMD+R should refresh this page, after CMD+SHIFT+R wouldn't bring up my PHP cmd for the next file below.
Anyways, I opened up http://apply.embed.ly/static/data/2.html with Safari, grabbed the source and threw it into TextMate and removed any lines without <article>
or <p>
.
I then made a table of the index of each <p>
and the amount I counted (I just eyeballed it):
Index 1: 19
Index 2: 8
Index 3: 3
Index 4: 5
Index 5: 4
Then I switched it into a string: ...
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,3,3,5,5,5,5,5,4,4,4,4
And inputted it to this website: http://easycalculation.com/statistics/standard-deviation.php
I did notice you didn't round up to 1.5, and that threw me off at first. Oh wells.
As far as challenge 2, I found someone else telling me the answer was 1.41 (or something that didn't round up to 1.5) Maybe the site I used is incorrect, or maybe I have one index wrong? (Or maybe the other person was wrong)