Skip to content

Commit 045501e

Browse files
committed
Add space-age
1 parent f5b2982 commit 045501e

8 files changed

Lines changed: 7279 additions & 2 deletions

File tree

.exercism/metadata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"track":"javascript","exercise":"space-age","id":"e628ec5e0184428fa1ff9d559a88586d","url":"https://exercism.io/my/solutions/e628ec5e0184428fa1ff9d559a88586d","handle":"elenamountz","is_requester":true,"auto_approve":false}

README.md

Lines changed: 53 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1-
### [exercism.io](https://exercism.io)
1+
# Space Age
22

3-
My solutions for exercism.io - JavaScript track.
3+
Given an age in seconds, calculate how old someone would be on:
4+
5+
- Earth: orbital period 365.25 Earth days, or 31557600 seconds
6+
- Mercury: orbital period 0.2408467 Earth years
7+
- Venus: orbital period 0.61519726 Earth years
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
13+
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.
16+
17+
If you're wondering why Pluto didn't make the cut, go watch [this
18+
youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).
19+
20+
## Setup
21+
22+
Go through the setup instructions for Javascript to
23+
install the necessary dependencies:
24+
25+
[https://exercism.io/tracks/javascript/installation](https://exercism.io/tracks/javascript/installation)
26+
27+
## Requirements
28+
29+
Install assignment dependencies:
30+
31+
```bash
32+
$ npm install
33+
```
34+
35+
## Making the test suite pass
36+
37+
Execute the tests with:
38+
39+
```bash
40+
$ npm test
41+
```
42+
43+
In the test suites all tests but the first have been skipped.
44+
45+
Once you get a test passing, you can enable the next one by
46+
changing `xtest` to `test`.
47+
48+
49+
## Source
50+
51+
Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01)
52+
53+
## Submitting Incomplete Solutions
54+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

space-age/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# metaData
2+
.exercism
3+
4+
# Dependency directories
5+
node_modules

space-age/README.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Space Age
2+
3+
Given an age in seconds, calculate how old someone would be on:
4+
5+
- Earth: orbital period 365.25 Earth days, or 31557600 seconds
6+
- Mercury: orbital period 0.2408467 Earth years
7+
- Venus: orbital period 0.61519726 Earth years
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
13+
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.
16+
17+
If you're wondering why Pluto didn't make the cut, go watch [this
18+
youtube video](http://www.youtube.com/watch?v=Z_2gbGXzFbs).
19+
20+
## Setup
21+
22+
Go through the setup instructions for Javascript to
23+
install the necessary dependencies:
24+
25+
[https://exercism.io/tracks/javascript/installation](https://exercism.io/tracks/javascript/installation)
26+
27+
## Requirements
28+
29+
Install assignment dependencies:
30+
31+
```bash
32+
$ npm install
33+
```
34+
35+
## Making the test suite pass
36+
37+
Execute the tests with:
38+
39+
```bash
40+
$ npm test
41+
```
42+
43+
In the test suites all tests but the first have been skipped.
44+
45+
Once you get a test passing, you can enable the next one by
46+
changing `xtest` to `test`.
47+
48+
49+
## Source
50+
51+
Partially inspired by Chapter 1 in Chris Pine's online Learn to Program tutorial. [http://pine.fm/LearnToProgram/?Chapter=01](http://pine.fm/LearnToProgram/?Chapter=01)
52+
53+
## Submitting Incomplete Solutions
54+
It's possible to submit an incomplete solution so you can see how others have completed the exercise.

0 commit comments

Comments
 (0)