From 3665d4917c95662825f8d827d8a1f7b9f8dc8ec2 Mon Sep 17 00:00:00 2001 From: BethanyG Date: Thu, 31 Mar 2022 18:52:32 -0700 Subject: [PATCH 1/2] Added starter hints file for darts exercise. Added notes on finding a point on a circle (2 ways) and a general equasion for calculating the distance between two points. Also added a note on the order in which points are calculated or checked. --- exercises/practice/darts/.docs/hints.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 exercises/practice/darts/.docs/hints.md diff --git a/exercises/practice/darts/.docs/hints.md b/exercises/practice/darts/.docs/hints.md new file mode 100644 index 0000000000..d54aec024f --- /dev/null +++ b/exercises/practice/darts/.docs/hints.md @@ -0,0 +1,20 @@ +# Hints + +## General + +- This challenge is all about calculating if a point falls _on, in, or outside_ a given circle. +- There are two different ways of calculating if a point falls on, in, or outside a circle. + - This Stack Overflow Post: [Equation for Testing if a Point is Inside a Circle][point-circle-equation] outlines one method. + - This DoubleRoot post [Position of a point relative to a circle][point-to-circle] outlines a different one. + - This Math is Fun post covers a more general [Distance Between 2 Points][distance-between-two-points] calculation. +- Because the dart board is a set of _nested_ circles, the order in which you calculate points could change the answer significantly. + You should pay attention to which direction your calculations "move" in. +- Remember that this exercise has many potential solutions and many paths you can take along the way. + No path is manifestly "better" than another, although a particular path may be more interesting or better suited to what you want to learn or explore right now. +- Some paths may trade speed for clarity. + Others might take up more memory but be more scalable or maintainable. +- We encourage you to try out more than one programming strategy to see what happens. + +[point-circle-equation]: https://stackoverflow.com/questions/481144/equation-for-testing-if-a-point-is-inside-a-circle +[point-to-circle]: https://doubleroot.in/lessons/circle/position-of-a-point/ +[distance-between-two-points]: https://www.mathsisfun.com/algebra/distance-2-points.html From a48a794d5999d29eaa7d18409792b91c0e820bcb Mon Sep 17 00:00:00 2001 From: BethanyG Date: Fri, 1 Apr 2022 03:42:39 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Italicized publications, as suggested by @kotp --- exercises/practice/darts/.docs/hints.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/practice/darts/.docs/hints.md b/exercises/practice/darts/.docs/hints.md index d54aec024f..592ffe42b6 100644 --- a/exercises/practice/darts/.docs/hints.md +++ b/exercises/practice/darts/.docs/hints.md @@ -4,9 +4,9 @@ - This challenge is all about calculating if a point falls _on, in, or outside_ a given circle. - There are two different ways of calculating if a point falls on, in, or outside a circle. - - This Stack Overflow Post: [Equation for Testing if a Point is Inside a Circle][point-circle-equation] outlines one method. - - This DoubleRoot post [Position of a point relative to a circle][point-to-circle] outlines a different one. - - This Math is Fun post covers a more general [Distance Between 2 Points][distance-between-two-points] calculation. + - This _Stack Overflow_ Post: [Equation for Testing if a Point is Inside a Circle][point-circle-equation] outlines one method. + - This _DoubleRoot_ post [Position of a point relative to a circle][point-to-circle] outlines a different one. + - This _Math is Fun_ post covers a more general [Distance Between 2 Points][distance-between-two-points] calculation. - Because the dart board is a set of _nested_ circles, the order in which you calculate points could change the answer significantly. You should pay attention to which direction your calculations "move" in. - Remember that this exercise has many potential solutions and many paths you can take along the way.