freeCodeCamp/curriculum/challenges/english/08-coding-interview-prep/project-euler/problem-389-platonic-dice.e...

58 lines
1.2 KiB
Markdown
Raw Normal View History

---
id: 5900f4f21000cf542c510004
challengeType: 5
title: 'Problem 389: Platonic Dice'
---
## Description
<section id='description'>
An unbiased single 4-sided die is thrown and its value, T, is noted.T unbiased 6-sided dice are thrown and their scores are added together. The sum, C, is noted.C unbiased 8-sided dice are thrown and their scores are added together. The sum, O, is noted.O unbiased 12-sided dice are thrown and their scores are added together. The sum, D, is noted.D unbiased 20-sided dice are thrown and their scores are added together. The sum, I, is noted.
Find the variance of I, and give your answer rounded to 4 decimal places.
</section>
## Instructions
<section id='instructions'>
</section>
## Tests
<section id='tests'>
```yml
tests:
- text: <code>euler389()</code> should return 2406376.3623.
testString: assert.strictEqual(euler389(), 2406376.3623, '<code>euler389()</code> should return 2406376.3623.');
```
</section>
## Challenge Seed
<section id='challengeSeed'>
<div id='js-seed'>
```js
function euler389() {
// Good luck!
return true;
}
euler389();
```
</div>
</section>
## Solution
<section id='solution'>
```js
// solution required
```
</section>