Loading…
Everything will be ready in few seconds
- Theory
- Theory
- Comments
New data
- Tr-r-r-raffic ranking is so-so?! Who do you think you are?! Puffs the tail
- But, boss, it’s statistics for just three days, it may be inaccurate.
- And how can you make it accurate? The tail is slowly coming down
- We need more data. Wait for one month.
- This is traffic for one more day. Analyze it right meow!
The boss’ feelings were hurt by the recommendation to try it harder with the blog. Plus, yesterday he released a very successful new video about how to ambush your owner and attack his feet using different techniques.
He calmed down (for now) after he heard about the lack of data. But he immediately sent the data for yesterday and he demands that they must be added to the program. And this is to our advantage. After all, a successful video means good traffic. And this will have a positive effect on the average traffic.
The boss will be delighted to see good results, and this will give us time to morally prepare him for possibly bad traffic results for the month.
Your urgent task is to add new data to the program. For this you need not only add a variable with traffic for yesterday (in the program and on the graph), but also update the formula for calculating the average. In the formula, add one more summand to the sum and also increase the divisor from three to four.
- script.js
Thanks! We’ll fix everything at once!
The code has changed, click “Run” or turn autorun on.
Result
- In the next line after the
thirdDayUsers
variable, addfourthDayUsers
variable with1247
value. - Add the
fourthDayUsers
parameter afterthirdDayUsers
in themuffin.plot()
command. - Change average value calculation. Add
fourthDayUsers
as the last summand and change the divisor to4
.
Comments