Synced problem descriptions to problem specs. (#3499)

This commit is contained in:
BethanyG
2023-09-07 15:08:41 -07:00
committed by GitHub
parent c0c2f677f4
commit 3386a897a3
3 changed files with 11 additions and 4 deletions

View File

@@ -6,6 +6,8 @@ Write a function that returns the earned points in a single toss of a Darts game
In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands: In our particular instance of the game, the target rewards 4 different amounts of points, depending on where the dart lands:
![Our dart scoreboard with values from a complete miss to a bullseye](https://assets.exercism.org/images/exercises/darts/darts-scoreboard.svg)
- If the dart lands outside the target, player earns no points (0 points). - If the dart lands outside the target, player earns no points (0 points).
- If the dart lands in the outer circle of the target, player earns 1 point. - If the dart lands in the outer circle of the target, player earns 1 point.
- If the dart lands in the middle circle of the target, player earns 5 points. - If the dart lands in the middle circle of the target, player earns 5 points.
@@ -16,8 +18,14 @@ Of course, they are all centered at the same point — that is, the circles are
Write a function that given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), returns the correct amount earned by a dart landing at that point. Write a function that given a point in the target (defined by its [Cartesian coordinates][cartesian-coordinates] `x` and `y`, where `x` and `y` are [real][real-numbers]), returns the correct amount earned by a dart landing at that point.
## Credit
The scoreboard image was created by [habere-et-dispertire][habere-et-dispertire] using [Inkscape][inkscape].
[darts]: https://en.wikipedia.org/wiki/Darts [darts]: https://en.wikipedia.org/wiki/Darts
[darts-target]: https://en.wikipedia.org/wiki/Darts#/media/File:Darts_in_a_dartboard.jpg [darts-target]: https://en.wikipedia.org/wiki/Darts#/media/File:Darts_in_a_dartboard.jpg
[concentric]: https://mathworld.wolfram.com/ConcentricCircles.html [concentric]: https://mathworld.wolfram.com/ConcentricCircles.html
[cartesian-coordinates]: https://www.mathsisfun.com/data/cartesian-coordinates.html [cartesian-coordinates]: https://www.mathsisfun.com/data/cartesian-coordinates.html
[real-numbers]: https://www.mathsisfun.com/numbers/real-numbers.html [real-numbers]: https://www.mathsisfun.com/numbers/real-numbers.html
[habere-et-dispertire]: https://exercism.org/profiles/habere-et-dispertire
[inkscape]: https://en.wikipedia.org/wiki/Inkscape

View File

@@ -1,11 +1,10 @@
# Instructions # Instructions
Determine if a number is perfect, abundant, or deficient based on Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.
Nicomachus' (60 - 120 CE) classification scheme for positive integers.
The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum][aliquot-sum]. The Greek mathematician [Nicomachus][nicomachus] devised a classification scheme for positive integers, identifying each as belonging uniquely to the categories of **perfect**, **abundant**, or **deficient** based on their [aliquot sum][aliquot-sum].
The aliquot sum is defined as the sum of the factors of a number not including the number itself. The aliquot sum is defined as the sum of the factors of a number not including the number itself.
For example, the aliquot sum of 15 is (1 + 3 + 5) = 9 For example, the aliquot sum of `15` is `1 + 3 + 5 = 9`.
- **Perfect**: aliquot sum = number - **Perfect**: aliquot sum = number
- 6 is a perfect number because (1 + 2 + 3) = 6 - 6 is a perfect number because (1 + 2 + 3) = 6

View File

@@ -23,7 +23,7 @@ For this exercise, you need to know only three things about them:
- Grey: 8 - Grey: 8
- White: 9 - White: 9
In `resistor-color duo` you decoded the first two colors. In Resistor Color Duo you decoded the first two colors.
For instance: orange-orange got the main value `33`. For instance: orange-orange got the main value `33`.
The third color stands for how many zeros need to be added to the main value. The third color stands for how many zeros need to be added to the main value.
The main value plus the zeros gives us a value in ohms. The main value plus the zeros gives us a value in ohms.