|
1 | 1 | # Instructions
|
2 | 2 |
|
3 |
| -Given an age in seconds, calculate how old someone would be on: |
| 3 | +Given an age in seconds, calculate how old someone would be on a planet in our Solar System. |
4 | 4 |
|
5 |
| -- Mercury: orbital period 0.2408467 Earth years |
6 |
| -- Venus: orbital period 0.61519726 Earth years |
7 |
| -- Earth: orbital period 1.0 Earth years, 365.25 Earth days, or 31557600 seconds |
8 |
| -- Mars: orbital period 1.8808158 Earth years |
9 |
| -- Jupiter: orbital period 11.862615 Earth years |
10 |
| -- Saturn: orbital period 29.447498 Earth years |
11 |
| -- Uranus: orbital period 84.016846 Earth years |
12 |
| -- Neptune: orbital period 164.79132 Earth years |
| 5 | +One Earth year equals 365.25 Earth days, or 31,557,600 seconds. |
| 6 | +If you were told someone was 1,000,000,000 seconds old, their age would be 31.69 Earth-years. |
13 | 7 |
|
14 |
| -So if you were told someone were 1,000,000,000 seconds old, you should |
15 |
| -be able to say that they're 31.69 Earth-years old. |
| 8 | +For the other planets, you have to account for their orbital period in Earth Years: |
16 | 9 |
|
17 |
| -If you're wondering why Pluto didn't make the cut, go watch [this YouTube video][pluto-video]. |
| 10 | +| Planet | Orbital period in Earth Years | |
| 11 | +| ------- | ----------------------------- | |
| 12 | +| Mercury | 0.2408467 | |
| 13 | +| Venus | 0.61519726 | |
| 14 | +| Earth | 1.0 | |
| 15 | +| Mars | 1.8808158 | |
| 16 | +| Jupiter | 11.862615 | |
| 17 | +| Saturn | 29.447498 | |
| 18 | +| Uranus | 84.016846 | |
| 19 | +| Neptune | 164.79132 | |
18 | 20 |
|
19 |
| -Note: The actual length of one complete orbit of the Earth around the sun is closer to 365.256 days (1 sidereal year). |
| 21 | +~~~~exercism/note |
| 22 | +The actual length of one complete orbit of the Earth around the sun is closer to 365.256 days (1 sidereal year). |
20 | 23 | The Gregorian calendar has, on average, 365.2425 days.
|
21 | 24 | While not entirely accurate, 365.25 is the value used in this exercise.
|
22 | 25 | See [Year on Wikipedia][year] for more ways to measure a year.
|
23 | 26 |
|
24 |
| -[pluto-video]: https://www.youtube.com/watch?v=Z_2gbGXzFbs |
25 | 27 | [year]: https://en.wikipedia.org/wiki/Year#Summary
|
| 28 | +~~~~ |
0 commit comments