-
-
Notifications
You must be signed in to change notification settings - Fork 546
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Square-Root: Add new exercise (#1582)
* Add square root exercie * Cite myself in metadata * Add radicand explantion, use PR as source_url * Add UUIDs, remove version * Adjust description.md Co-authored-by: wolf99 <[email protected]>
- Loading branch information
Showing
3 changed files
with
70 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,59 @@ | ||
{ | ||
"exercise": "square-root", | ||
"cases": [ | ||
{ | ||
"uuid": "9b748478-7b0a-490c-b87a-609dacf631fd", | ||
"description": "root of 1", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 1 | ||
}, | ||
"expected": 1 | ||
}, | ||
{ | ||
"uuid": "7d3aa9ba-9ac6-4e93-a18b-2e8b477139bb", | ||
"description": "root of 4", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 4 | ||
}, | ||
"expected": 2 | ||
}, | ||
{ | ||
"uuid": "6624aabf-3659-4ae0-a1c8-25ae7f33c6ef", | ||
"description": "root of 25", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 25 | ||
}, | ||
"expected": 5 | ||
}, | ||
{ | ||
"uuid": "93beac69-265e-4429-abb1-94506b431f81", | ||
"description": "root of 81", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 81 | ||
}, | ||
"expected": 9 | ||
}, | ||
{ | ||
"uuid": "fbddfeda-8c4f-4bc4-87ca-6991af35360e", | ||
"description": "root of 196", | ||
"property": "squareRoot", | ||
"input": { | ||
"radicand": 196 | ||
}, | ||
"expected": 14 | ||
}, | ||
{ | ||
"uuid": "c03d0532-8368-4734-a8e0-f96a9eb7fc1d", | ||
"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. | ||
|
||
Note that the term "radicand" refers to the number for which the root is to be determined. That is, it is the number under the root symbol. | ||
|
||
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 also that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up). |
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: "wolf99" | ||
source_url: "https://github.com/exercism/problem-specifications/pull/1582" |