-
-
Notifications
You must be signed in to change notification settings - Fork 550
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
wolf99
committed
Oct 7, 2019
1 parent
dab442f
commit 33d31cc
Showing
3 changed files
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"exercise": "square-root", | ||
"version": "1.0.0", | ||
"cases": [ | ||
{ | ||
"description": "root of 1", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 1 | ||
}, | ||
"expected": 1 | ||
}, | ||
{ | ||
"description": "root of 4", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 4 | ||
}, | ||
"expected": 2 | ||
}, | ||
{ | ||
"description": "root of 25", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 25 | ||
}, | ||
"expected": 5 | ||
}, | ||
{ | ||
"description": "root of 81", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 81 | ||
}, | ||
"expected": 9 | ||
}, | ||
{ | ||
"description": "root of 196", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 196 | ||
}, | ||
"expected": 14 | ||
}, | ||
{ | ||
"description": "root of 65025", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 65025 | ||
}, | ||
"expected": 255 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Given a natural radicand, return its square root. | ||
|
||
Check out the Wikipedia pages on [square root](https://en.wikipedia.org/wiki/Square_root) and [methods of computing square roots](https://en.wikipedia.org/wiki/Methods_of_computing_square_roots). | ||
|
||
Recall that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up). | ||
|
||
When implementing this in a language with a built-in square root function, implement your own function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
blurb: "Given a natural radicand, return its square root." | ||
source: "" | ||
source_url: "" |