From 15af7bf3f896abc9ad1a963d0438127f5b172006 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Tue, 5 Nov 2024 16:48:54 +1100 Subject: [PATCH 01/22] Update description.md Moving generally applicable information from the Python specific addendum as per https://forum.exercism.org/t/moving-generic-instructions-from-python-addendum-to-overall-problem-specification/13678/1 and https://forum.exercism.org/t/square-root-exercise-instructions-could-be-clearer/13664/11 See also https://github.com/exercism/python/pull/3815/files --- exercises/square-root/description.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/exercises/square-root/description.md b/exercises/square-root/description.md index a6e11b4abc..ea757f6230 100644 --- a/exercises/square-root/description.md +++ b/exercises/square-root/description.md @@ -9,5 +9,7 @@ Check out the Wikipedia pages on [square root][square-root] and [methods of comp Recall also that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up). +It is possible to compute the square root of any natural number using only natural numbers in the computation. + [square-root]: https://en.wikipedia.org/wiki/Square_root [computing-square-roots]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots From 0ec68996dcb9960e1f7bab651ce003d9a9939b1f Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Wed, 6 Nov 2024 00:45:25 +1100 Subject: [PATCH 02/22] Update description.md Include text suggested by tasx in the discussion at https://forum.exercism.org/t/moving-generic-instructions-from-python-addendum-to-overall-problem-specification/13678/7 --- exercises/square-root/description.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/exercises/square-root/description.md b/exercises/square-root/description.md index ea757f6230..a6fe798a26 100644 --- a/exercises/square-root/description.md +++ b/exercises/square-root/description.md @@ -9,7 +9,9 @@ Check out the Wikipedia pages on [square root][square-root] and [methods of comp Recall also that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up). -It is possible to compute the square root of any natural number using only natural numbers in the computation. +Avoid using built-in functions or libraries that directly compute the square root. +Instead, create your own approach to approximate or calculate the square root. +It is possible to calculate the square root of any natural number using only natural numbers in the calculation. [square-root]: https://en.wikipedia.org/wiki/Square_root [computing-square-roots]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots From d4f9c27bd344da06e47396726d1e94f5b56aca54 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 01:28:53 +1100 Subject: [PATCH 03/22] Update description.md Incorporate changes workshopped in the discussion at https://forum.exercism.org/t/moving-generic-instructions-from-python-addendum-to-overall-problem-specification/13678 --- exercises/square-root/description.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/exercises/square-root/description.md b/exercises/square-root/description.md index a6fe798a26..5e1af52fa7 100644 --- a/exercises/square-root/description.md +++ b/exercises/square-root/description.md @@ -1,17 +1,24 @@ # Description -Given a natural radicand, return its square root. +We are launching a deep space exploration rocket and we need a way to make sure the navigation system stays on target. -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. +The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. -Check out the Wikipedia pages on [square root][square-root] and [methods of computing square roots][computing-square-roots]. +Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. Unfortunately that means that we can’t rely on fancy math libraries and functions, as they would take more power. Instead we want to calculate or approximate the square root directly. -Recall also that natural numbers are positive real whole numbers (i.e. 1, 2, 3 and up). +Your task is to implement a function that calculates or approximates the square root of a given number. -Avoid using built-in functions or libraries that directly compute the square root. -Instead, create your own approach to approximate or calculate the square root. -It is possible to calculate the square root of any natural number using only natural numbers in the calculation. +* Try to avoid using the pre-existing math libraries of your language. +* As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… +* The function also only needs to output positive whole numbers. -[square-root]: https://en.wikipedia.org/wiki/Square_root +Examples of some approaches you could consider are: + +* Linear or binary search for a number that gives the input number when squared +* Successive approximation using Newton's or Heron's method +* Calculating one digit at a time or one bit at a time + +You can check out the Wikipedia pages on [integer square root][integer-square-root] and [methods of computing square roots][computing-square-roots] to help with choosing a method of calculation. + +[integer-square-root]: https://en.wikipedia.org/wiki/Integer_square_root [computing-square-roots]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots From 46670c71a98bf78b1300b161c262d26695aef8b4 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 01:32:37 +1100 Subject: [PATCH 04/22] Update description.md Comply with markdown style guide for bullet lists --- exercises/square-root/description.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/exercises/square-root/description.md b/exercises/square-root/description.md index 5e1af52fa7..0830408112 100644 --- a/exercises/square-root/description.md +++ b/exercises/square-root/description.md @@ -8,15 +8,15 @@ Because the journey will be very long, we had to make our rocket’s onboard com Your task is to implement a function that calculates or approximates the square root of a given number. -* Try to avoid using the pre-existing math libraries of your language. -* As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… -* The function also only needs to output positive whole numbers. +- Try to avoid using the pre-existing math libraries of your language. +- As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… +- The function also only needs to output positive whole numbers. Examples of some approaches you could consider are: -* Linear or binary search for a number that gives the input number when squared -* Successive approximation using Newton's or Heron's method -* Calculating one digit at a time or one bit at a time +- Linear or binary search for a number that gives the input number when squared +- Successive approximation using Newton's or Heron's method +- Calculating one digit at a time or one bit at a time You can check out the Wikipedia pages on [integer square root][integer-square-root] and [methods of computing square roots][computing-square-roots] to help with choosing a method of calculation. From 7807e7a2f9db55b54ef241513d7ffcd18681aafc Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 03:00:10 +1100 Subject: [PATCH 05/22] One line per sentence and don't use the word "function" --- exercises/square-root/description.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/exercises/square-root/description.md b/exercises/square-root/description.md index 0830408112..8e3d2dbcb6 100644 --- a/exercises/square-root/description.md +++ b/exercises/square-root/description.md @@ -4,13 +4,15 @@ We are launching a deep space exploration rocket and we need a way to make sure The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. -Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. Unfortunately that means that we can’t rely on fancy math libraries and functions, as they would take more power. Instead we want to calculate or approximate the square root directly. +Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. +Unfortunately that means that we can’t rely on fancy math libraries and functions, as they would take more power. +Instead we want to calculate or approximate the square root directly. -Your task is to implement a function that calculates or approximates the square root of a given number. +Your task is to implement a calculation of the square root of a given number. - Try to avoid using the pre-existing math libraries of your language. - As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… -- The function also only needs to output positive whole numbers. +- You also only need to output a positive whole number. Examples of some approaches you could consider are: From 34af70c032dd56cf93a20d245e71e910d4093af0 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 03:14:56 +1100 Subject: [PATCH 06/22] Split description into introduction and instructions --- .../square-root/{description.md => instructions.md} | 10 +--------- exercises/square-root/introduction.md | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) rename exercises/square-root/{description.md => instructions.md} (56%) create mode 100644 exercises/square-root/introduction.md diff --git a/exercises/square-root/description.md b/exercises/square-root/instructions.md similarity index 56% rename from exercises/square-root/description.md rename to exercises/square-root/instructions.md index 8e3d2dbcb6..9b3eaaf96b 100644 --- a/exercises/square-root/description.md +++ b/exercises/square-root/instructions.md @@ -1,12 +1,4 @@ -# Description - -We are launching a deep space exploration rocket and we need a way to make sure the navigation system stays on target. - -The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. - -Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. -Unfortunately that means that we can’t rely on fancy math libraries and functions, as they would take more power. -Instead we want to calculate or approximate the square root directly. +# Instructions Your task is to implement a calculation of the square root of a given number. diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md new file mode 100644 index 0000000000..46e095bccd --- /dev/null +++ b/exercises/square-root/introduction.md @@ -0,0 +1,9 @@ +# Introduction + +We are launching a deep space exploration rocket and we need a way to make sure the navigation system stays on target. + +The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. + +Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. +Unfortunately that means that we can’t rely on fancy math libraries and functions, as they would take more power. +Instead we want to calculate or approximate the square root directly. From 1ae54c68a113198c041068a1c98ea65c44cf130e Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 09:37:34 +1100 Subject: [PATCH 07/22] Update exercises/square-root/introduction.md Co-authored-by: Isaac Good --- exercises/square-root/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index 46e095bccd..871990f317 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -5,5 +5,5 @@ We are launching a deep space exploration rocket and we need a way to make sure The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. -Unfortunately that means that we can’t rely on fancy math libraries and functions, as they would take more power. +Unfortunately that means that we can’t rely on fancy math libraries and functions, as they use more power. Instead we want to calculate or approximate the square root directly. From f2f6a2cb1f0d09af45b62ecaf02045d0c38dc822 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 09:37:56 +1100 Subject: [PATCH 08/22] Update exercises/square-root/instructions.md Co-authored-by: Isaac Good --- exercises/square-root/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index 9b3eaaf96b..4d2fe9d8ed 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -1,6 +1,6 @@ # Instructions -Your task is to implement a calculation of the square root of a given number. +Your task is to calculate the square root of a given number. - Try to avoid using the pre-existing math libraries of your language. - As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… From dcfe0d63cc0f2e80aa2285748c7bc59e046112d2 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 09:38:10 +1100 Subject: [PATCH 09/22] Update exercises/square-root/instructions.md Co-authored-by: Isaac Good --- exercises/square-root/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index 4d2fe9d8ed..c81f08a9c0 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -6,7 +6,7 @@ Your task is to calculate the square root of a given number. - As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… - You also only need to output a positive whole number. -Examples of some approaches you could consider are: +Here are some approaches you could use. - Linear or binary search for a number that gives the input number when squared - Successive approximation using Newton's or Heron's method From 1eb635647e1416b0806493f96e46bff629e34f6f Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 09:42:51 +1100 Subject: [PATCH 10/22] Terminate sentences with periods. --- exercises/square-root/instructions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index c81f08a9c0..7050c4883a 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -8,9 +8,9 @@ Your task is to calculate the square root of a given number. Here are some approaches you could use. -- Linear or binary search for a number that gives the input number when squared -- Successive approximation using Newton's or Heron's method -- Calculating one digit at a time or one bit at a time +- Linear or binary search for a number that gives the input number when squared. +- Successive approximation using Newton's or Heron's method. +- Calculating one digit at a time or one bit at a time. You can check out the Wikipedia pages on [integer square root][integer-square-root] and [methods of computing square roots][computing-square-roots] to help with choosing a method of calculation. From 4179cb413e6ff7abe802e9b6def8a2ef2427def4 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 10:01:29 +1100 Subject: [PATCH 11/22] Rephrase introduction. --- exercises/square-root/introduction.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index 871990f317..a5ce45bfa4 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -4,6 +4,7 @@ We are launching a deep space exploration rocket and we need a way to make sure The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. -Because the journey will be very long, we had to make our rocket’s onboard computer very power efficient so it wouldn’t drain the batteries. +The journey will be very long. +To make the batteries last as long as possible, we had to make our rocket’s onboard computer very power efficient. Unfortunately that means that we can’t rely on fancy math libraries and functions, as they use more power. Instead we want to calculate or approximate the square root directly. From 6ea8e9cf64a28d34358f8b7b1c1bb1622ce31864 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 15:10:59 +1100 Subject: [PATCH 12/22] Update exercises/square-root/instructions.md Co-authored-by: Victor Goff --- exercises/square-root/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index 7050c4883a..fb4ceadc85 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -6,7 +6,7 @@ Your task is to calculate the square root of a given number. - As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… - You also only need to output a positive whole number. -Here are some approaches you could use. +Some potential approaches: - Linear or binary search for a number that gives the input number when squared. - Successive approximation using Newton's or Heron's method. From 2cdf1d8fa90f183967c21caad27cd43f03d44be3 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 15:11:40 +1100 Subject: [PATCH 13/22] Update exercises/square-root/introduction.md Co-authored-by: Victor Goff --- exercises/square-root/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index a5ce45bfa4..2345f9a4f4 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -2,7 +2,7 @@ We are launching a deep space exploration rocket and we need a way to make sure the navigation system stays on target. -The first step in our coordinate calculation involves taking a number as input and finding another number which multiplied by itself will equal our input number, or in other words, finding the square root of our input number. +As the first step in our calculation, we take a number and find its square root—that is, the number that, when multiplied by itself, equals the given number. The journey will be very long. To make the batteries last as long as possible, we had to make our rocket’s onboard computer very power efficient. From 3453fe4feac78161df47c0a76d7898ef9e238775 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 16:59:04 +1100 Subject: [PATCH 14/22] Further wording changes --- exercises/square-root/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index 2345f9a4f4..0c21d335ec 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -2,7 +2,7 @@ We are launching a deep space exploration rocket and we need a way to make sure the navigation system stays on target. -As the first step in our calculation, we take a number and find its square root—that is, the number that, when multiplied by itself, equals the given number. +As the first step in our calculation, we take a target number and find its square root (that is, the number that when multiplied by itself equals the target number). The journey will be very long. To make the batteries last as long as possible, we had to make our rocket’s onboard computer very power efficient. From 7c932bbeceb924a7bd7955bbe34c79a26cfc1154 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 17:40:07 +1100 Subject: [PATCH 15/22] Simplify introduction --- exercises/square-root/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index 0c21d335ec..60b1a6bc26 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -7,4 +7,4 @@ As the first step in our calculation, we take a target number and find its squar The journey will be very long. To make the batteries last as long as possible, we had to make our rocket’s onboard computer very power efficient. Unfortunately that means that we can’t rely on fancy math libraries and functions, as they use more power. -Instead we want to calculate or approximate the square root directly. +Instead we want to calculate the square root directly. From 08133708a5a41980e59389dbe1b23e3275c2ef3f Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 17:41:59 +1100 Subject: [PATCH 16/22] Replace "output" with "return" --- exercises/square-root/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index fb4ceadc85..71831bf68d 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -4,7 +4,7 @@ Your task is to calculate the square root of a given number. - Try to avoid using the pre-existing math libraries of your language. - As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… -- You also only need to output a positive whole number. +- You also only need to return a positive whole number. Some potential approaches: From b18c2a2b12300299f8aeacd58429f78130de0400 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Thu, 7 Nov 2024 20:02:39 +1100 Subject: [PATCH 17/22] Remove Wikipedia links --- exercises/square-root/instructions.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index 71831bf68d..e0109ac22f 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -11,8 +11,3 @@ Some potential approaches: - Linear or binary search for a number that gives the input number when squared. - Successive approximation using Newton's or Heron's method. - Calculating one digit at a time or one bit at a time. - -You can check out the Wikipedia pages on [integer square root][integer-square-root] and [methods of computing square roots][computing-square-roots] to help with choosing a method of calculation. - -[integer-square-root]: https://en.wikipedia.org/wiki/Integer_square_root -[computing-square-roots]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots From fcc6fb2ddc5cc0989beb4dba7d0702aec08d6595 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Fri, 8 Nov 2024 00:44:38 +1100 Subject: [PATCH 18/22] Revert "Remove Wikipedia links" This reverts commit b18c2a2b12300299f8aeacd58429f78130de0400. --- exercises/square-root/instructions.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index e0109ac22f..71831bf68d 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -11,3 +11,8 @@ Some potential approaches: - Linear or binary search for a number that gives the input number when squared. - Successive approximation using Newton's or Heron's method. - Calculating one digit at a time or one bit at a time. + +You can check out the Wikipedia pages on [integer square root][integer-square-root] and [methods of computing square roots][computing-square-roots] to help with choosing a method of calculation. + +[integer-square-root]: https://en.wikipedia.org/wiki/Integer_square_root +[computing-square-roots]: https://en.wikipedia.org/wiki/Methods_of_computing_square_roots From 70066d92320f55a24af2660144f40f0407426bc1 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Fri, 8 Nov 2024 03:35:47 +1100 Subject: [PATCH 19/22] Update exercises/square-root/instructions.md Co-authored-by: Anastasios Chatzialexiou <16361161+tasxatzial@users.noreply.github.com> --- exercises/square-root/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index 71831bf68d..b5cf4c1052 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -3,7 +3,7 @@ Your task is to calculate the square root of a given number. - Try to avoid using the pre-existing math libraries of your language. -- As input you’ll be given a positive whole number, i.e. 1, 2, 3, 4… +- As input you'll be given a positive whole number, i.e. 1, 2, 3, 4… - You also only need to return a positive whole number. Some potential approaches: From 5bfbb45fa49aea417ffaa0f78da519711bca6b98 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Fri, 8 Nov 2024 03:36:10 +1100 Subject: [PATCH 20/22] Update exercises/square-root/introduction.md Co-authored-by: Anastasios Chatzialexiou <16361161+tasxatzial@users.noreply.github.com> --- exercises/square-root/introduction.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index 60b1a6bc26..71d529b470 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -5,6 +5,6 @@ We are launching a deep space exploration rocket and we need a way to make sure As the first step in our calculation, we take a target number and find its square root (that is, the number that when multiplied by itself equals the target number). The journey will be very long. -To make the batteries last as long as possible, we had to make our rocket’s onboard computer very power efficient. -Unfortunately that means that we can’t rely on fancy math libraries and functions, as they use more power. +To make the batteries last as long as possible, we had to make our rocket's onboard computer very power efficient. +Unfortunately that means that we can't rely on fancy math libraries and functions, as they use more power. Instead we want to calculate the square root directly. From e460bd529f7466c3b75f185c636b3efe26e2c3ad Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Fri, 8 Nov 2024 03:40:52 +1100 Subject: [PATCH 21/22] Clarify requirements --- exercises/square-root/instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/instructions.md b/exercises/square-root/instructions.md index b5cf4c1052..d258b86876 100644 --- a/exercises/square-root/instructions.md +++ b/exercises/square-root/instructions.md @@ -4,7 +4,7 @@ Your task is to calculate the square root of a given number. - Try to avoid using the pre-existing math libraries of your language. - As input you'll be given a positive whole number, i.e. 1, 2, 3, 4… -- You also only need to return a positive whole number. +- You are only required to handle cases where the result is a positive whole number. Some potential approaches: From 7486a27500fa88d609f13ce8acade9ba84b350c0 Mon Sep 17 00:00:00 2001 From: Andrew Pam Date: Fri, 8 Nov 2024 04:11:18 +1100 Subject: [PATCH 22/22] Remove "directly" --- exercises/square-root/introduction.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/square-root/introduction.md b/exercises/square-root/introduction.md index 71d529b470..1d692934f2 100644 --- a/exercises/square-root/introduction.md +++ b/exercises/square-root/introduction.md @@ -7,4 +7,4 @@ As the first step in our calculation, we take a target number and find its squar The journey will be very long. To make the batteries last as long as possible, we had to make our rocket's onboard computer very power efficient. Unfortunately that means that we can't rely on fancy math libraries and functions, as they use more power. -Instead we want to calculate the square root directly. +Instead we want to implement our own square root calculation.