From 17f6eccd4d5f657c7f0efa94c8c0e8662edf68b1 Mon Sep 17 00:00:00 2001 From: camperbot Date: Mon, 23 Jan 2023 21:44:46 +0530 Subject: [PATCH] chore(i18n,learn): processed translations (#49117) --- ...ad-only-variable-with-the-const-keyword.md | 10 +- ...rences-between-the-var-and-let-keywords.md | 12 +-- ...pare-scopes-of-the-var-and-let-keywords.md | 16 +-- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- .../615f575b50b91e72af079480.md | 2 +- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- .../project-euler/problem-227-the-chase.md | 16 +-- .../problem-228-minkowski-sums.md | 16 +-- ...-229-four-representations-using-squares.md | 14 +-- .../problem-230-fibonacci-words.md | 22 ++-- ...-factorisation-of-binomial-coefficients.md | 12 +-- .../project-euler/problem-232-the-race.md | 16 +-- .../problem-233-lattice-points-on-a-circle.md | 10 +- .../problem-234-semidivisible-numbers.md | 14 +-- ...em-235-an-arithmetic-geometric-sequence.md | 12 +-- .../problem-236-luxury-hampers.md | 30 +++--- ...blem-237-tours-on-a-4-x-n-playing-board.md | 20 ++-- .../problem-238-infinite-string-tour.md | 24 ++--- .../problem-239-twenty-two-foolish-primes.md | 8 +- .../project-euler/problem-240-top-dice.md | 6 +- .../project-euler/problem-253-tidying-up.md | 40 +++---- .../problem-254-sums-of-digit-factorials.md | 14 +-- .../problem-255-rounded-square-roots.md | 30 +++--- .../problem-256-tatami-free-rooms.md | 22 ++-- .../project-euler/problem-267-billionaire.md | 16 +-- ...ur-distinct-prime-factors-less-than-100.md | 8 +- ...ynomials-with-at-least-one-integer-root.md | 22 ++-- .../problem-270-cutting-squares.md | 14 +-- .../problem-271-modular-cubes-part-1.md | 10 +- .../problem-272-modular-cubes-part-2.md | 10 +- ...roblem-296-angular-bisector-and-tangent.md | 12 +-- .../problem-297-zeckendorf-representation.md | 16 +-- .../problem-33-digit-cancelling-fractions.md | 12 +-- .../problem-34-digit-factorials.md | 10 +- .../problem-35-circular-primes.md | 26 ++--- .../problem-36-double-base-palindromes.md | 18 ++-- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- .../learn-how-javascript-assertions-work.md | 8 +- .../american-british-translator.md | 42 ++++---- .../issue-tracker.md | 58 +++++----- .../metric-imperial-converter.md | 72 ++++++------- .../personal-library.md | 12 +-- .../sudoku-solver.md | 100 +++++++++--------- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- ...pare-scopes-of-the-var-and-let-keywords.md | 10 +- ...plete-a-promise-with-resolve-and-reject.md | 12 +-- .../es6/create-a-javascript-promise.md | 10 +- .../es6/create-a-module-script.md | 2 +- .../handle-a-fulfilled-promise-with-then.md | 2 +- ...f-an-array-using-concat-instead-of-push.md | 2 +- ...ramming-to-convert-strings-to-url-slugs.md | 8 +- ...ray-into-a-string-using-the-join-method.md | 10 +- ...bine-two-arrays-using-the-concat-method.md | 2 +- .../implement-map-on-a-prototype.md | 6 +- ...lement-the-filter-method-on-a-prototype.md | 6 +- ...ion-to-currying-and-partial-application.md | 18 ++-- ...avoid-external-dependence-in-a-function.md | 18 ++-- ...actor-global-variables-out-of-functions.md | 22 ++-- ...-an-array-using-slice-instead-of-splice.md | 14 +-- ...ray-without-changing-the-original-array.md | 14 +-- ...part-of-an-array-using-the-slice-method.md | 12 +-- ...ay-alphabetically-using-the-sort-method.md | 18 ++-- ...ng-into-an-array-using-the-split-method.md | 12 +-- ...tand-functional-programming-terminology.md | 26 ++--- ...nd-the-hazards-of-using-imperative-code.md | 24 ++--- ...er-or-reduce-to-solve-a-complex-problem.md | 18 ++-- ...ry-element-in-an-array-meets-a-criteria.md | 16 +-- ...er-method-to-extract-data-from-an-array.md | 16 +-- ...ap-method-to-extract-data-from-an-array.md | 18 ++-- .../use-the-reduce-method-to-analyze-data.md | 22 ++-- ...ny-elements-in-an-array-meet-a-criteria.md | 14 +-- .../american-british-translator.md | 4 +- .../sudoku-solver.md | 4 +- 83 files changed, 624 insertions(+), 624 deletions(-) diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md index 153b88469b1..456f9e58da1 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md @@ -1,6 +1,6 @@ --- id: 587d7b87367417b2b2512b41 -title: إعلان متغير للقراءة ثابت باستخدام مصطلح const +title: إعلان متغير ثابت للقراءة فقط باستخدام مصطلح const challengeType: 1 forumTopicId: 301201 dashedName: declare-a-read-only-variable-with-the-const-keyword @@ -10,7 +10,7 @@ dashedName: declare-a-read-only-variable-with-the-const-keyword لا يكون أستخدام مصطلح `let` الطريقة الجديدة الوحيدة لإعلان المتغيرات. في ES6، يمكنك أيضا إعلان المتغيرات باستخدام كلمة `const`. -تحتوي `const` كل الميزات الرائعة الموجودة في `let`، مع المكافأة المضافة و هي أن المتغيرات المعلنة بواسطة `const` ثابته. هي قيمة ثابتة، مما يعني أنه بمجرد تعيين متغير باستخدام `const`، فلا يمكن إعادة تعيينه: +تحتوي `const` كل الميزات الرائعة الموجودة في `let`، مع المكافأة المضافة و هي أن المتغيرات المعلنة بواسطة `const` تستعمل للقراءة فقط. وإنهم قيم ثابتة، مما يعني أنه بمجرد إعلان المتغير باستخدام `const`، فلا يمكن إعادة تعيينه: ```js const FAV_PET = "Cats"; @@ -19,9 +19,9 @@ FAV_PET = "Dogs"; سيتم عرض خطأ في وحدة التحكم بسبب إعادة تعيين قيمة `FAV_PET`. -يجب عليك دائماً تسمية المتغيرات التي لا ترد إعادة تعيينها باستخدام كلمة `const`. يساعد هذا عندما تحاول بالخطأ إعادة تعيين متغير من المفترض أن يظل ثابتًا. +يجب عليك دائماً إعلان المتغيرات التي لا تريد إعادة تعيينها باستخدام المصطلح `const`. يساعد هذا عندما تحاول بالخطأ إعادة تعيين متغير من المفترض أن يظل ثابتًا. -**ملاحظة:** من الشائع عند المطورين استخدام معرّفات بأسلوب uppercase للمتغيرات ذات القيم الثابتة وأسلوب lowercase أو camelCase للقيم القابلة للتغيير (كائنات (objects) وقوائم (arrays)). سوف تتعلم المزيد عن الكائنات والقوائم و القيم الثابتة والقابلة للتغيير في تحديات لاحقة. أيضا في التحديات اللاحقة، سترى أمثلة لمعرِّفات المتغيرات uppercase أو lowercase أو camelCase. +**ملاحظة:** من الشائع عند المطورين استخدام معرّفات بأسلوب uppercase للمتغيرات ذات القيم الثابتة وأسلوب lowercase أو camelCase للقيم القابلة للتغيير ( مثل الكائنات (objects) والقوائم (arrays)). سوف تتعلم المزيد عن الكائنات, والقوائم, و القيم الثابتة, والقيم القابلة للتغيير في تحديات لاحقة. أيضا في التحديات اللاحقة، سترى أمثلة لمعرِّفات المتغيرات uppercase أو lowercase أو camelCase. # --instructions-- @@ -48,7 +48,7 @@ assert.notMatch(code, /(fCC)/); assert.match(code, /const\s+FCC/); ``` -لا ينبغي تغيير المقطع المسندة في المتغير `FCC`. +لا ينبغي تغيير المقطع النصي في المتغير `FCC`. ```js assert.equal(FCC, 'freeCodeCamp'); diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md index 38ee1bca4fb..459318b501e 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md @@ -8,7 +8,7 @@ dashedName: explore-differences-between-the-var-and-let-keywords # --description-- -واحدة من أكبر المشكلات في إعلان المتغيرات بكلمة `var` هي أنه يمكنك بسهولة إلغاء الإعلانات السابقة للمتغيرات: +واحدة من أكبر المشكلات في إعلان المتغيرات بمصطلح `var` هي أنه يمكنك بسهولة استبدال قيم الإعلانات السابقة للمتغيرات: ```js var camper = "James"; @@ -16,11 +16,11 @@ var camper = "David"; console.log(camper); ``` -في الكود أعلاه، أعطى متغير `camper` قيمة `James` في الإعلان الأصلي، ثم ألغيَ عند إعادة إعلانه ليصبح `David`. ولذلك يعرض الكونسول (console) المقطع النصي (string) الآتي `David`. +في الكود أعلاه، أعطى متغير `camper` قيمة `James` في الإعلان الأصلي، ثم تستبدل عند إعادة إعلانه ليصبح `David`. ولذلك يعرض وحدة التحكم (console) المقطع النصي (string) الآتي `David`. -في تطبيق صغير، قد لا تواجه هذه المشكلة. لكن إذا أصبح الكود الخاص بك أكبر، قد تلغي متغير دون وعي. ولأن هذا السلوك لا يوقع خطأ، يصبح البحث عن الأخطاء وإصلاحها أكثر صعوبة. +في تطبيق صغير، قد لا تواجه هذه المشكلة. لكن إذا أصبح مركزك للكود أكبر، قد تستبدل قيمة متغير دون وعي. ولأن هذا السلوك لا يوقع خطأ، يصبح البحث عن الأخطاء وإصلاحها أكثر صعوبة. -تم تقديم كلمة `let` في ES6، وهو تحديث رئيسي في الجافاسكريبت (JavaScript)، لحل هذه المشكلة المحتملة باستخدام `var`. ستتعرف على ميزات ES6 الأخرى في التحديات اللاحقة. +قدم مصطلح `let` في ES6، وهو تحديث رئيسي للغة JavaScript، لحل هذه المشكلة المحتملة باستخدام مصطلح `var`. ستتعرف إلى ميزات ES6 الأخرى في التحديات اللاحقة. إذا استبدلت `var` إلى `let` في الكود أعلاه، فإنه يؤدي إلى خطأ: @@ -29,13 +29,13 @@ let camper = "James"; let camper = "David"; ``` -يمكن رؤية الخطأ في الكونسول (console) المتصفح الخاص بك. +يمكن رؤية الخطأ في وحدة التحكم (console) متصفحك. لذلك على خلاف `var`، عندما تستعمل `let`، يمكن إعلان متغير بنفس الاسم مرة واحدة فقط. # --instructions-- -حدِّث الكود بحيث يستخدم فقط كلمة `let`. +حدّث الكود بحيث يستخدم فقط مصطلح `let`. # --hints-- diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md index 31f80c53dc6..42c9c370f03 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md @@ -10,9 +10,9 @@ dashedName: compare-scopes-of-the-var-and-let-keywords إذا كانت `let` غير مألوف، تحقق هذا التحدي عن أختلاف بين كلمة (let) وكلمة (var). -عندما تعلن متغير باستخدام كلمة `var`، يكون للمتغير مجال شامل (global scope)، أو إذا تم الإعلان عنه داخل وظيفة (function) فمجاله محدد (local scope). +عندما تعلن متغير باستخدام مصطلح `var`، يكون للمتغير مجال شامل (global scope)، أو إذا اعلن عنه داخل وظيفة (function) فمجاله محدد (local scope). -كلمة `let` تتصرف بالمثل، ولكن مع بعض الميزات الإضافية. عندما تعلن متغير باستخدام `let` داخل الكتلة أو تعبير أو عبارة، فنطاق المتغير يقتصر على تلك الكتلة (block) أو التعبير (statement) أو العبارة (expression). +يتصرف مصطلح `let` بالمثل، ولكن مع بعض الميزات الإضافية. عندما تعلن متغير باستخدام `let` داخل الكتلة أو تعبير أو عبارة، فنطاق المتغير يقتصر على تلك الكتلة (block) أو التعبير (statement) أو العبارة (expression). على سبيل المثال: @@ -27,7 +27,7 @@ console.log(i); هنا ستعرض وحدة التحكم القيم `[0, 1, 2]` و `3`. -مع كلمة `var`، يتم الإعلان الشامل عن `i`. لذلك عندما يتم تنفيذ `i++`، فإنه يحدث المتغير الشامل. وهذا الكود مماثل لما يلي: +مع مصطلح `var`، يعلن `i` بشكل شامل. لذلك عندما ينفذ `i++`، فإنه يحدث المتغير الشامل. وهذا الكود مماثل لما يلي: ```js var numArray = []; @@ -57,7 +57,7 @@ console.log(printNumTwo()); هنا ستعرض وحدة التحكم القيمة `3`. -كما تري، `printNumTwo()` يطبع 3 وليس 2. هذا لأن القيمة التي تم تعيينها إلى `i` تم تحديثها و `printNumTwo()` يرجع القيمة الشاملة `i` وليس القيمة التي احتواها `i` عندما تم إنشاء الوظيفة في حلقة التكرار. لا تتبع كلمة `let` هذا السلوك: +كما تري، `printNumTwo()` يطبع 3 وليس 2. هذا لأن القيمة التي عينت إلى `i` تُحدث, وتنتج `printNumTwo()` القيمة الشاملة `i` وليس القيمة التي احتواها `i` عندما أنشئت الوظيفة في حلقة التكرار. لا تتبع مصطلح `let` هذا السلوك: ```js let printNumTwo; @@ -74,13 +74,13 @@ console.log(i); هنا ستعرض وحدة التحكم القيمة `2`، وخطأ `i is not defined`. -`i` غير معروف لأنه لم يتم إعلانه في المجال الشامل (global scope). تم الإعلان عنه فقط ضمن حلقة `for`. أنتج `printNumTwo()` القيمة الصحيحة لأن ثلاث متغيرات `i` مختلفة مع قيم فريدة (0, 1, و 2) تم إنشاؤها بواسطة `let` داخل كود الحلقة التكرارية. +`i` غير معروف لأنه لم يعلن في المجال الشامل (global scope). اعلن عنه فقط ضمن حلقة `for`. أنتج `printNumTwo()` القيمة الصحيحة لأن ثلاث متغيرات `i` مختلفة مع قيم فريدة (0, 1, و 2) أنشئت بواسطة `let` داخل كود الحلقة التكرارية. # --instructions-- -أصلح الكود بحيث أن `i` المعلن عنها في `if` تصبح متغير منفصل من `i` المعلن عنها في السطر الأول من الوظيفة. كن متأكدا من عدم استخدام كلمة `var` في أي مكان في الكود الخاص بك. +أصلح الكود بحيث إن `i` المعلن عنها في `if` تصبح متغير منفصل من `i` المعلن عنها في السطر الأول من الوظيفة. كن متيقن من عدم استخدام مصطلح `var` في أي مكان في كودك. -تم تصميم هذا التمرين لتوضيح الفرق بين كيفية تعيين الكلمات `var` و `let` نطاقًا للمتغير المعلن. عند برمجة وظيفة مماثلة لتلك المستخدمة في هذه الممارسة، كثيرا ما يكون من الأفضل استخدام أسماء مختلفة للمتغيرات لتجنب الخلط. +تم تصميم هذا التمرين لتوضيح الفرق بين كيفية تعيين المصطلحات `var` و `let` نطاقًا للمتغير المعلن. عند برمجة وظيفة مماثلة لتلك المستخدمة في هذه الممارسة، كثيرا ما يكون من الأفضل استخدام أسماء مختلفة للمتغيرات لتجنب الخلط. # --hints-- @@ -90,7 +90,7 @@ console.log(i); assert(!code.match(/var/g)); ``` -المتغير `i` المعلن عنه في `if` يجب أن يساوي المقطع النصي `block scope`. +يجب أن يساوي المتغير `i` المعلن عنه في `if` المقطع النصي `block scope`. ```js assert(code.match(/(i\s*=\s*).*\s*.*\s*.*\1('|")block\s*scope\2/g)); diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 06069d9be10..ef14b99aa5d 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -All 24 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -All 6 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index ee1c337c9f5..fce5f5592f1 100644 --- a/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/arabic/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -All 12 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -All 14 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the expected functionality you should write tests for. +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md index 04e6d72b795..53799b6ef7b 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-typography-by-building-a-nutrition-label/615f575b50b91e72af079480.md @@ -1,6 +1,6 @@ --- id: 615f575b50b91e72af079480 -title: Step 35 +title: الخطوة 35 challengeType: 0 dashedName: step-35 --- diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md index e12ecc8b78b..5c6f25da4c8 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -所有 24 項單元測試都已完成並通過。 請參閱 `/tests/1_unit-tests.js` 來了解你應該寫的測試的預期行爲。 +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -所有 6 項功能測試都已完成並通過。 請參閱 `/tests/2_functional-tests.js` 來了解你應該編寫的測試的功能。 +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 625e99cf81b..c8da70120a5 100644 --- a/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/chinese-traditional/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -所有 12 項單元測試都已完成並通過。 請參閱 `/tests/1_unit-tests.js` 來了解你應該寫的測試的預期行爲。 +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -所有 14 項功能測試都已完成並通過。 請參閱 `/tests/2_functional-tests.js` 來了解你應該編寫的測試的功能。 +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md index b8a4a3d9b11..fb624bec74c 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -所有 24 项单元测试都已完成并通过。 请参阅 `/tests/1_unit-tests.js` 来了解你应该写的测试的预期行为。 +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -所有 6 项功能测试都已完成并通过。 请参阅 `/tests/2_functional-tests.js` 来了解你应该编写的测试的功能。 +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 3a8baa293fe..f45707443a2 100644 --- a/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/chinese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -所有 12 项单元测试都已完成并通过。 请参阅 `/tests/1_unit-tests.js` 来了解你应该写的测试的预期行为。 +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -所有 14 项功能测试都已完成并通过。 请参阅 `/tests/2_functional-tests.js` 来了解你应该编写的测试的功能。 +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 75f0c064296..05142a6c1bb 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -Todas las 24 pruebas unitarias estan completas y pasan. Consulta `/tests/1_unit-tests.js` para el comportamiento esperado para el que deberías escribir pruebas. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -Todas las 6 pruebas funcionales estan completas y pasan. Consulta `/tests/2_functional-tests.js` para la funcionalidad a la que deberías escribir pruebas. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 253d32e2620..d464cdb12ba 100644 --- a/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/espanol/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -All 12 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -All 14 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the expected functionality you should write tests for. +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 06069d9be10..ef14b99aa5d 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -All 24 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -All 6 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index ee1c337c9f5..fce5f5592f1 100644 --- a/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/german/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -All 12 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -All 14 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the expected functionality you should write tests for. +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-227-the-chase.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-227-the-chase.md index 3121c6ac8d8..a9f0e245411 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-227-the-chase.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-227-the-chase.md @@ -8,23 +8,23 @@ dashedName: problem-227-the-chase # --description-- -"The Chase" is a game played with two dice and an even number of players. +"The Chase" ist ein Spiel, das mit zwei Würfeln und einer geraden Anzahl an Spielern gespielt wird. -The players sit around a table; the game begins with two opposite players having one die each. On each turn, the two players with a die roll it. +Die Spieler sitzen an einem Tisch – das Spiel beginnt mit zwei gegenübersitzenden Spielern, die jeweils einen Würfel haben. In jedem Zug würfeln die beiden Spieler mit einem Würfel. -If the player rolls a 1, he passes the die to his neighbour on the left. +Wirft der Spieler eine 1, gibt er den Würfel an seinen Nachbarn auf der linken Seite weiter. -If the player rolls a 6, he passes the die to his neighbour on the right. +Wirft der Spieler eine 6, gibt er den Würfel an seinen Nachbarn auf der rechten Seite weiter. -Otherwise, he keeps the die for the next turn. +Ansonsten behält er den Würfel bis zum nächsten Zug. -The game ends when one player has both dice after they have been rolled and passed; that player has then lost. +Das Spiel endet, wenn ein Spieler beide Würfel hat, nachdem gewürfelt wurde und sie weitergegeben wurden; dieser Spieler hat dann verloren. -In a game with 100 players, what is the expected number of turns the game lasts? Give your answer rounded to ten significant digits. +Was wäre die voraussichtliche Anzahl von Spielzügen bei einem Spiel mit 100 Spielern? Runde deine Antwort bis auf die letzten zehn relevanten Ziffern ab. # --hints-- -`theChase()` should return `3780.618622`. +`theChase()` sollte `3780.618622` zurückgeben. ```js assert.strictEqual(theChase(), 3780.618622); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-228-minkowski-sums.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-228-minkowski-sums.md index 3bccd240ed2..b1b998b34d5 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-228-minkowski-sums.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-228-minkowski-sums.md @@ -1,6 +1,6 @@ --- id: 5900f4511000cf542c50ff63 -title: 'Problem 228: Minkowski Sums' +title: 'Problem 228: Minkowski-Summen' challengeType: 1 forumTopicId: 301871 dashedName: problem-228-minkowski-sums @@ -8,24 +8,24 @@ dashedName: problem-228-minkowski-sums # --description-- -Let $S_n$ be the regular $n$-sided polygon – or shape – whose vertices $v_k (k = 1, 2, \ldots, n)$ have coordinates: +Lasse $S_n$ das regelmäßige $n$-seitige Polygon - oder die Form sein -, dessen Eckpunkte $v_k (k = 1, 2, \ldots, n)$ Koordinaten haben: $$\begin{align} & x_k = cos(\frac{2k - 1}{n} × 180°) \\\\ & y_k = sin(\frac{2k - 1}{n} × 180°) \end{align}$$ -Each $S_n$ is to be interpreted as a filled shape consisting of all points on the perimeter and in the interior. +Jedes $S_n$ ist als eine gefüllte Form zu interpretieren, die aus allen Punkten auf dem Umfang und im Inneren besteht. -The Minkowski sum, $S + T$, of two shapes $S$ and $T$ is the result of adding every point in $S$ to every point in $T$, where point addition is performed coordinate-wise: $(u, v) + (x, y) = (u + x, v + y)$. +Die Minkowski-Summe $S + T$ zweier Formen $S$ und $T$ ist das Ergebnis der Addition jedes Punktes in $S$ zu jedem Punkt in $T$, wobei die Punktaddition koordinatenweise erfolgt: $(u, v) + (x, y) = (u + x, v + y)$. -For example, the sum of $S_3$ and $S_4$ is the six-sided shape shown in pink below: +Zum Beispiel ist die Summe von $S_3$ und $S_4$ die unten rosa dargestellte sechsseitige Form: -image showing S_3, S_4 and S_3 + S_4 +das Bild zeigt S_3, S_4 und S_3 + S_4 -How many sides does $S_{1864} + S_{1865} + \ldots + S_{1909}$ have? +Wie viele Seiten hat $S_{1864} + S_{1865} + \ldots + S_{1909}$? # --hints-- -`minkowskiSums()` should return `86226`. +`minkowskiSums()` sollte `86226` zurückgeben. ```js assert.strictEqual(minkowskiSums(), 86226); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.md index 3903d30320f..85f222cf1b1 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-229-four-representations-using-squares.md @@ -8,29 +8,29 @@ dashedName: problem-229-four-representations-using-squares # --description-- -Consider the number 3600. It is very special, because +Betrachten wir die Zahl 3600. Sie ist sehr speziell, da $$\begin{align} & 3600 = {48}^2 + {36}^2 \\\\ & 3600 = {20}^2 + {2×40}^2 \\\\ & 3600 = {30}^2 + {3×30}^2 \\\\ & 3600 = {45}^2 + {7×15}^2 \\\\ \end{align}$$ -Similarly, we find that $88201 = {99}^2 + {280}^2 = {287}^2 + 2 × {54}^2 = {283}^2 + 3 × {52}^2 = {197}^2 + 7 × {84}^2$. +Ebenso finden wir, dass $88201 = {99}^2 + {280}^2 = {287}^2 + 2 × {54}^2 = {283}^2 + 3 × {52}^2 = {197}^2 + 7 × {84}^2$. -In 1747, Euler proved which numbers are representable as a sum of two squares. We are interested in the numbers $n$ which admit representations of all of the following four types: +1747 bewies Euler, welche Zahlen als Summe von zwei Quadraten darstellbar sind. Wir interessieren uns für die Zahlen $n$, die Darstellungen aller der folgenden vier Typen zulassen: $$\begin{align} & n = {a_1}^2 + {b_1}^2 \\\\ & n = {a_2}^2 + 2{b_2}^2 \\\\ & n = {a_3}^2 + 3{b_3}^2 \\\\ & n = {a_7}^2 + 7{b_7}^2 \\\\ \end{align}$$ -where the $a_k$ and $b_k$ are positive integers. +wobei die $a_k$ und $b_k$ positive ganze Zahlen sind. -There are 75373 such numbers that do not exceed ${10}^7$. +Es gibt 75373 solcher Zahlen, die ${10}^7$ nicht überschreiten. -How many such numbers are there that do not exceed $2 × {10}^9$? +Wie viele solcher Zahlen gibt es, die $2 × {10}^9$ nicht überschreiten? # --hints-- -`representationsUsingSquares()` should return `11325263`. +`representationsUsingSquares()` sollte `11325263` zurückgeben. ```js assert.strictEqual(representationsUsingSquares(), 11325263); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-230-fibonacci-words.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-230-fibonacci-words.md index bc6cd70f1cc..cf010084a6f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-230-fibonacci-words.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-230-fibonacci-words.md @@ -1,6 +1,6 @@ --- id: 5900f4531000cf542c50ff65 -title: 'Problem 230: Fibonacci Words' +title: 'Problem 230: Fibonacci-Wörter' challengeType: 1 forumTopicId: 301874 dashedName: problem-230-fibonacci-words @@ -8,37 +8,37 @@ dashedName: problem-230-fibonacci-words # --description-- -For any two strings of digits, $A$ and $B$, we define $F_{A,B}$ to be the sequence ($A, B, AB, BAB, ABBAB, \ldots$) in which each term is the concatenation of the previous two. +Für zwei beliebige Ziffernfolgen, $A$ und $B$, definieren wir $F_{A,B}$ als die Folge ($A, B, AB, BAB, ABBAB, \ldots$), in der jeder Term die Verkettung der beiden vorherigen ist. -Further, we define $D_{A,B}(n)$ to be the $n^{\text{th}}$ digit in the first term of $F_{A,B}$ that contains at least $n$ digits. +Ferner definieren wir $D_{A,B}(n)$ als die $n^{\text{th}}$-Ziffer im ersten Term von $F_{A,B}$, die mindestens $n$ Ziffern enthält. -Example: +Beispiel: -Let $A = 1\\,415\\,926\\,535$, $B = 8\\,979\\,323\\,846$. We wish to find $D_{A,B}(35)$, say. +Lasse $A = 1\\,415\\,926\\,535$, $B = 8\\,979\\,323\\,846$. Wir wollen z.B. $D_{A,B}(35)$ finden. -The first few terms of $F_{A,B}$ are: +Die ersten paar Terme von $F_{A,B}$ sind: $$\begin{align} & 1\\,415\\,926\\,535 \\\\ & 8\\,979\\,323\\,846 \\\\ & 14\\,159\\,265\\,358\\,979\\,323\\,846 \\\\ & 897\\,932\\,384\\,614\\,159\\,265\\,358\\,979\\,323\\,846 \\\\ & 14\\,159\\,265\\,358\\,979\\,323\\,846\\,897\\,932\\,384\\,614\\,15\color{red}{9}\\,265\\,358\\,979\\,323\\,846 \end{align}$$ -Then $D_{A,B}(35)$ is the ${35}^{\text{th}}$ digit in the fifth term, which is 9. +Dann ist $D_{A,B}(35)$ die ${35}^{\text{th}}$-Ziffer im fünften Term, die 9 ist. -Now we use for $A$ the first 100 digits of $π$ behind the decimal point: +Nun verwenden wir für $A$ die ersten 100 Stellen von $π$ hinter dem Dezimaltrennzeichen: $$\begin{align} & 14\\,159\\,265\\,358\\,979\\,323\\,846\\,264\\,338\\,327\\,950\\,288\\,419\\,716\\,939\\,937\\,510 \\\\ & 58\\,209\\,749\\,445\\,923\\,078\\,164\\,062\\,862\\,089\\,986\\,280\\,348\\,253\\,421\\,170\\,679 \end{align}$$ -and for $B$ the next hundred digits: +und für $B$ die nächsten hundert Ziffern: $$\begin{align} & 82\\,148\\,086\\,513\\,282\\,306\\,647\\,093\\,844\\,609\\,550\\,582\\,231\\,725\\,359\\,408\\,128 \\\\ & 48\\,111\\,745\\,028\\,410\\,270\\,193\\,852\\,110\\,555\\,964\\,462\\,294\\,895\\,493\\,038\\,196 \end{align}$$ -Find $\sum_{n = 0, 1, \ldots, 17} {10}^n × D_{A,B}((127 + 19n) × 7^n)$. +Finde $\sum_{n = 0, 1, \ldots, 17} {10}^n × D_{A,B}((127 + 19n) × 7^n)$. # --hints-- -`fibonacciWords()` should return `850481152593119200`. +`fibonacciWords()` sollte `850481152593119200` zurückgeben. ```js assert.strictEqual(fibonacciWords(), 850481152593119200); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.md index 498810cf48c..418dccc22a5 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-231-the-prime-factorisation-of-binomial-coefficients.md @@ -1,6 +1,6 @@ --- id: 5900f4531000cf542c50ff66 -title: 'Problem 231: The prime factorisation of binomial coefficients' +title: 'Problem 231: Die Primfaktorzerlegung der Binomialkoeffizienten' challengeType: 1 forumTopicId: 301875 dashedName: problem-231-the-prime-factorisation-of-binomial-coefficients @@ -8,17 +8,17 @@ dashedName: problem-231-the-prime-factorisation-of-binomial-coefficients # --description-- -The binomial coefficient $\displaystyle\binom{10}{3} = 120$. +Der Binomialkoeffizient $\displaystyle\binom{10}{3} = 120$. -$120 = 2^3 × 3 × 5 = 2 × 2 × 2 × 3 × 5$, and $2 + 2 + 2 + 3 + 5 = 14$. +$120 = 2^3 × 3 × 5 = 2 × 2 × 2 × 3 × 5$, und $2 + 2 + 2 + 3 + 5 = 14$. -So the sum of the terms in the prime factorisation of $\displaystyle\binom{10}{3}$ is $14$. +Die Summe der Begriffe in der Primfaktorzerlegung von $\displaystyle\binom{10}{3}$ ist also $14$. -Find the sum of the terms in the prime factorisation of $\binom{20\\,000\\,000}{15\\,000\\,000}$. +Finde die Summe der Begriffe in der Primfaktorzerlegung von $\binom{20\\,000\\,000}{15\\,000\,000}$. # --hints-- -`primeFactorisation()` should return `7526965179680`. +`primeFactorisation()` sollte `7526965179680` zurückgeben. ```js assert.strictEqual(primeFactorisation(), 7526965179680); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-232-the-race.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-232-the-race.md index c03c0d687b3..cdadd91c8ff 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-232-the-race.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-232-the-race.md @@ -8,23 +8,23 @@ dashedName: problem-232-the-race # --description-- -Two players share an unbiased coin and take it in turns to play "The Race". +Zwei Spieler teilen sich eine unparteiische Münze und spielen abwechselnd "The Race". -On Player 1's turn, he tosses the coin once: if it comes up Heads, he scores one point; if it comes up Tails, he scores nothing. +Wenn Spieler 1 an der Reihe ist, wirft er die Münze einmal: Wenn sie Kopf zeigt, erhält er einen Punkt; wenn sie Zahl zeigt, erhält er keinen Punkt. -On Player 2's turn, she chooses a positive integer $T$ and tosses the coin $T$ times: if it comes up all Heads, she scores $2^{T - 1}$ points; otherwise, she scores nothing. +Wenn Spieler 2 an der Reihe ist, wählt er eine positive ganze Zahl $T$ und wirft die Münze $T$ Mal: Wenn sie immer Kopf zeigt, erhält er $2^{T - 1}$ Punkte; andernfalls erhält er keine Punkte. -Player 1 goes first. The winner is the first to 100 or more points. +Spieler 1 fängt an. Der Gewinner ist der erste, der 100 oder mehr Punkte erreicht. -On each turn Player 2 selects the number, $T$, of coin tosses that maximises the probability of her winning. +In jedem Zug wählt Spieler 2 die Anzahl $T$ der Münzwürfe, die seine Gewinnwahrscheinlichkeit maximiert. -What is the probability that Player 2 wins? +Wie hoch ist die Wahrscheinlichkeit, dass Spieler 2 gewinnt? -Give your answer rounded to eight decimal places in the form 0.abcdefgh . +Gib deine Antwort auf acht Dezimalstellen gerundet in der Form 0.abcdefgh an. # --hints-- -`theRace()` should return `0.83648556`. +`theRace()` sollte `0.83648556` zurückgeben. ```js assert.strictEqual(theRace(), 0.83648556); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.md index db650947233..d555adedc55 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-233-lattice-points-on-a-circle.md @@ -1,6 +1,6 @@ --- id: 5900f4551000cf542c50ff68 -title: 'Problem 233: Lattice points on a circle' +title: 'Problem 233: Gitterpunkte auf einem Kreis' challengeType: 1 forumTopicId: 301877 dashedName: problem-233-lattice-points-on-a-circle @@ -8,15 +8,15 @@ dashedName: problem-233-lattice-points-on-a-circle # --description-- -Let $f(N)$ be the number of points with integer coordinates that are on a circle passing through $(0,0)$, $(N,0)$,$(0,N)$, and $(N,N)$. +Lasse $f(N)$ die Anzahl der Punkte mit ganzzahligen Koordinaten sein, die auf einem Kreis liegen, der durch $(0,0)$, $(N,0)$,$(0,N)$ und $(N,N)$ geht. -It can be shown that $f(10000) = 36$. +Es kann gezeigt werden, dass $f(10000) = 36$ ist. -What is the sum of all positive integers $N ≤ {10}^{11}$ such that $f(N) = 420$? +Was ist die Summe aller positiven Ganzzahlen $N ≤ {10}^{11}$, so dass $f(N) = 420$? # --hints-- -`latticePointsOnACircle()` should return `271204031455541300`. +`latticePointsOnACircle()` sollte `271204031455541300` zurückgeben. ```js assert.strictEqual(latticePointsOnACircle(), 271204031455541300); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.md index ec01ca36a28..19f282252f3 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-234-semidivisible-numbers.md @@ -1,6 +1,6 @@ --- id: 5900f4571000cf542c50ff69 -title: 'Problem 234: Semidivisible numbers' +title: 'Problem 234: Halbteilbare Zahlen' challengeType: 1 forumTopicId: 301878 dashedName: problem-234-semidivisible-numbers @@ -8,19 +8,19 @@ dashedName: problem-234-semidivisible-numbers # --description-- -For an integer $n ≥ 4$, we define the lower prime square root of $n$, denoted by $lps(n)$, as the $\text{largest prime} ≤ \sqrt{n}$ and the upper prime square root of $n$, $ups(n)$, as the $\text{smallest prime} ≥ \sqrt{n}$. +Für eine ganze Zahl $n ≥ 4$ definieren wir die untere Primzahlwurzel von $n$, bezeichnet mit $lps(n)$, als den $\text{größte Primzahl} ≤ \sqrt{n}$ und die obere Primzahlwurzel von $n$, $ups(n)$, als den $\text{kleinste Primzahl} ≥ \sqrt{n}$. -So, for example, $lps(4) = 2 = ups(4)$, $lps(1000) = 31$, $ups(1000) = 37$. +So ist zum Beispiel $lps(4) = 2 = ups(4)$, $lps(1000) = 31$, $ups(1000) = 37$. -Let us call an integer $n ≥ 4$ semidivisible, if one of $lps(n)$ and $ups(n)$ divides $n$, but not both. +Wir nennen eine ganze Zahl $n ≥ 4$ halbteilbar, wenn eine von $lps(n)$ und $ups(n)$ $ $n$ teilt, aber nicht beide. -The sum of the semidivisible numbers not exceeding 15 is 30, the numbers are 8, 10 and 12. 15 is not semidivisible because it is a multiple of both $lps(15) = 3$ and $ups(15) = 5$. As a further example, the sum of the 92 semidivisible numbers up to 1000 is 34825. +Die Summe der halbteilbaren Zahlen, die 15 nicht überschreiten, ist 30. Die Zahlen sind 8, 10 und 12. 15 ist nicht halb teilbar, weil es ein Vielfaches von $lps(15) = 3$ und $ups(15) = 5$ ist. Ein weiteres Beispiel: Die Summe der 92 halbteilbaren Zahlen bis 1000 ist 34825. -What is the sum of all semidivisible numbers not exceeding 999966663333? +Was ist die Summe aller halbteilbaren Zahlen, die 999966663333 nicht überschreiten? # --hints-- -`semidivisibleNumbers()` should return `1259187438574927000`. +`semidivisibleNumbers()` sollte `1259187438574927000` zurückgeben. ```js assert.strictEqual(semidivisibleNumbers(), 1259187438574927000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.md index 893687367a5..cbd7f12a471 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-235-an-arithmetic-geometric-sequence.md @@ -1,6 +1,6 @@ --- id: 5900f4571000cf542c50ff6a -title: 'Problem 235: An Arithmetic Geometric sequence' +title: 'Problem 235: Eine arithmetisch-geometrische Folge' challengeType: 1 forumTopicId: 301879 dashedName: problem-235-an-arithmetic-geometric-sequence @@ -8,17 +8,17 @@ dashedName: problem-235-an-arithmetic-geometric-sequence # --description-- -Given is the arithmetic-geometric sequence $u(k) = (900 - 3k)r^{k - 1}$. +Gegeben ist die arithmetisch-geometrische Folge $u(k) = (900 - 3k)r^{k - 1}$. -Let $s(n) = \sum_{k=1 \ldots n} u(k)$. +Lasse $s(n) = \sum_{k=1 \ldots n} u(k)$. -Find the value of $r$ for which $s(5000) = -600\\,000\\,000\\,000$. +Finde den Wert von $r$ für den $s(5000) = -600\\,000\\,000\\,000$. -Give your answer rounded to 12 places behind the decimal point. +Gib deine Antwort auf 12 Stellen hinter dem Komma gerundet an. # --hints-- -`arithmeticGeometricSequence()` should return `1.002322108633`. +`arithmeticGeometricSequence()` sollte `1.002322108633` zurückgeben. ```js assert.strictEqual(arithmeticGeometricSequence(), 1.002322108633); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-236-luxury-hampers.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-236-luxury-hampers.md index 2ae12a0ab04..353c8c2523a 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-236-luxury-hampers.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-236-luxury-hampers.md @@ -8,38 +8,38 @@ dashedName: problem-236-luxury-hampers # --description-- -Suppliers 'A' and 'B' provided the following numbers of products for the luxury hamper market: +Die Anbieter "A" und "B" lieferten die folgende Anzahl von Produkten für den Markt für Luxuskörbe: -| Product | 'A' | 'B' | +| Produkt | 'A' | 'B' | | ------------------ | ---- | ---- | -| Beluga Caviar | 5248 | 640 | -| Christmas Cake | 1312 | 1888 | +| Beluga-Kaviar | 5248 | 640 | +| Weihnachtskuchen | 1312 | 1888 | | Gammon Joint | 2624 | 3776 | -| Vintage Port | 5760 | 3776 | -| Champagne Truffles | 3936 | 5664 | +| Vintage-Port | 5760 | 3776 | +| Champagner Trüffel | 3936 | 5664 | -Although the suppliers try very hard to ship their goods in perfect condition, there is inevitably some spoilage - i.e. products gone bad. +Obwohl sich die Lieferanten sehr bemühen, ihre Waren in einwandfreiem Zustand zu versenden, kommt es zwangsläufig zu einem gewissen Verderb - d.h. zu verdorbenen Produkten. -The suppliers compare their performance using two types of statistic: +Die Anbieter vergleichen ihre Leistungen anhand von zwei Arten von Statistiken: -- The five per-product spoilage rates for each supplier are equal to the number of products gone bad divided by the number of products supplied, for each of the five products in turn. -- The overall spoilage rate for each supplier is equal to the total number of products gone bad divided by the total number of products provided by that supplier. +- Die fünf Verderbnisraten pro Produkt für jeden Lieferanten entsprechen der Anzahl der verdorbenen Produkte geteilt durch die Anzahl der gelieferten Produkte, und zwar für jedes der fünf Produkte der Reihe nach. +- Die Gesamtverderbnisrate für jeden Lieferanten ist gleich der Gesamtzahl der verdorbenen Produkte geteilt durch die Gesamtzahl der von diesem Lieferanten gelieferten Produkte. -To their surprise, the suppliers found that each of the five per-product spoilage rates was worse (higher) for 'B' than for 'A' by the same factor (ratio of spoilage rates), $m > 1$; and yet, paradoxically, the overall spoilage rate was worse for 'A' than for 'B', also by a factor of $m$. +Zu ihrer Überraschung stellten die Lieferanten fest, dass jede der fünf Verderbnisraten pro Produkt bei "B" um denselben Faktor (Verhältnis der Verderbnisraten), $m > 1$, schlechter (höher) war als bei "A"; und dennoch war paradoxerweise die Gesamtverderbnisrate bei "A" schlechter als bei "B", ebenfalls um einen Faktor $m$. -There are thirty-five $m > 1$ for which this surprising result could have occurred, the smallest of which is $\frac{1476}{1475}$. +Es gibt fünfunddreißig $m > 1$, für die dieses überraschende Ergebnis eingetreten sein könnte, wobei die kleinste davon $\frac{1476}{1475}$ ist. -What's the largest possible value of $m$? Give your answer as a string with fraction reduced to its lowest terms, in the form `u/v`. +Was ist der größtmögliche Wert von $m$? Gib deine Antwort als Zeichenkette mit dem auf die kleinsten Terme reduzierten Bruch in der Form `u/v` an. # --hints-- -`luxuryHampers()` should return a string. +`luxuryHampers()` sollte einen String zurückgeben. ```js assert(typeof luxuryHampers() === 'string'); ``` -`luxuryHampers()` should return the string `123/59`. +`luxuryHampers()` sollte einen String `123/59` zurückgeben. ```js assert.strictEqual(luxuryHampers(), '123/59'); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.md index ef7c2a30c04..cc478b543d5 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-237-tours-on-a-4-x-n-playing-board.md @@ -1,6 +1,6 @@ --- id: 5900f4591000cf542c50ff6c -title: 'Problem 237: Tours on a 4 x n playing board' +title: 'Problem 237: Touren auf einem 4 x n Spielbrett' challengeType: 1 forumTopicId: 301882 dashedName: problem-237-tours-on-a-4-x-n-playing-board @@ -8,22 +8,22 @@ dashedName: problem-237-tours-on-a-4-x-n-playing-board # --description-- -Let $T(n)$ be the number of tours over a 4 × $n$ playing board such that: +Lass $T(n)$ die Anzahl der Touren auf einem 4 × $n$ Spielbrett sein, so dass: -- The tour starts in the top left corner. -- The tour consists of moves that are up, down, left, or right one square. -- The tour visits each square exactly once. -- The tour ends in the bottom left corner. +- Die Tour beginnt in der oberen linken Ecke. +- Die Tour besteht aus Zügen, die ein Feld nach oben, unten, links oder rechts gehen. +- Die Tour durchläuft jedes Feld genau einmal. +- Die Tour endet in der linken unteren Ecke. -The diagram shows one tour over a 4 × 10 board: +Das Diagramm zeigt eine Tour über einem 4 × 10 Board: -one tour over 4 x 10 board +eine Tour über 4 x 10 Brett -$T(10)$ is 2329. What is $T({10}^{12})$ modulo ${10}^8$? +$T(10) $ ist 2329. Was ist $T({10}^{12})$ moduo ${10}^8$? # --hints-- -`toursOnPlayingBoard()` should return `15836928`. +`toursOnPlayingBoard()` sollte `15836928` zurückgeben. ```js assert.strictEqual(toursOnPlayingBoard(), 15836928); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-238-infinite-string-tour.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-238-infinite-string-tour.md index 6f49452d838..ed7d3826247 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-238-infinite-string-tour.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-238-infinite-string-tour.md @@ -1,6 +1,6 @@ --- id: 5900f45b1000cf542c50ff6d -title: 'Problem 238: Infinite string tour' +title: 'Problem 238: Unendliche String Tour' challengeType: 1 forumTopicId: 301883 dashedName: problem-238-infinite-string-tour @@ -8,32 +8,32 @@ dashedName: problem-238-infinite-string-tour # --description-- -Create a sequence of numbers using the "Blum Blum Shub" pseudo-random number generator: +Erstelle eine Zahlensequenz, indem du den "Blum Blum Shub" pseudo-zufälligen Zahlengenerator verwendest: $$ s_0 = 14025256 \\\\ s_{n + 1} = {s_n}^2 \\; mod \\; 20\\,300\\,713 $$ -Concatenate these numbers $s_0s_1s_2\ldots$ to create a string $w$ of infinite length. Then, $w = 14025256741014958470038053646\ldots$ +Verkette diese Zahlen $s_0s_1s_2\ldots$, um eine Zeichenkette $w$ von unendlicher Länge zu erzeugen. Dann $w = 14025256741014958470038053646\ldots$ -For a positive integer $k$, if no substring of $w$ exists with a sum of digits equal to $k$, $p(k)$ is defined to be zero. If at least one substring of $w$ exists with a sum of digits equal to $k$, we define $p(k) = z$, where $z$ is the starting position of the earliest such substring. +Existiert für eine positive ganze Zahl $k$ kein Teilstring von $w$ mit einer Ziffernsumme gleich $k$, so ist $p(k)$ als Null definiert. Existiert mindestens eine Teilkette von $w$ mit einer Summe von Ziffern gleich $k$, so definieren wir $p(k) = z$, wobei $z$ die Anfangsposition der ersten Teilkette dieser Art ist. -For instance: +Zum Beispiel: -The substrings 1, 14, 1402, … with respective sums of digits equal to 1, 5, 7, … start at position 1, hence $p(1) = p(5) = p(7) = \ldots = 1$. +Die Teilstrings 1, 14, 1402, ... mit den jeweiligen Quersummen 1, 5, 7, ... beginnen an der Position 1, also $p(1) = p(5) = p(7) = \ldots = 1$. -The substrings 4, 402, 4025, … with respective sums of digits equal to 4, 6, 11, … start at position 2, hence $p(4) = p(6) = p(11) = \ldots = 2$. +Die Teilstrings 4, 402, 4025, ... mit den jeweiligen Quersummen 4, 6, 11, ... beginnen an der Position 2, also $p(4) = p(6) = p(11) = \ldots = 2$. -The substrings 02, 0252, … with respective sums of digits equal to 2, 9, … start at position 3, hence $p(2) = p(9) = \ldots = 3$. +Die Teilzeichenketten 02, 0252, ... mit den jeweiligen Ziffernsummen 2, 9, ... beginnen an Position 3, also $p(2) = p(9) = \ldots = 3$. -Note that substring 025 starting at position 3, has a sum of digits equal to 7, but there was an earlier substring (starting at position 1) with a sum of digits equal to 7, so $p(7) = 1$, not 3. +Man beachte, dass die Teilzeichenkette 025, die an Position 3 beginnt, eine Ziffernsumme von 7 hat, aber es gab eine frühere Teilzeichenkette (beginnend an Position 1) mit einer Ziffernsumme von 7, also $p(7) = 1$, nicht 3. -We can verify that, for $0 < k ≤ {10}^3$, $\sum p(k) = 4742$. +Wir können überprüfen, dass für $0 < k ≤ {10}^3$, $\sum p(k) = 4742$. -Find $\sum p(k)$, for $0 < k ≤ 2 \times {10}^{15}$. +Finde $\sum p(k)$, für $0 < k ≤ 2 \times {10}^{15}$. # --hints-- -`infiniteStringTour()` should return `9922545104535660`. +`infiniteStringTour()` sollte `9922545104535660` zurückgeben. ```js assert.strictEqual(infiniteStringTour(), 9922545104535660); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.md index 9fff8274ba8..33a6b8509f7 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-239-twenty-two-foolish-primes.md @@ -8,15 +8,15 @@ dashedName: problem-239-twenty-two-foolish-primes # --description-- -A set of disks numbered 1 through 100 are placed in a line in random order. +Ein Satz Disketten nummeriert von 1 bis 100 sind in einer Reihe in zufälliger Reihenfolge angeordnet. -What is the probability that we have a partial derangement such that exactly 22 prime number discs are found away from their natural positions? (Any number of non-prime disks may also be found in or out of their natural positions.) +Wie groß ist die Wahrscheinlichkeit, dass wir eine Teilversetzung haben bei der genau 22 Primzahl-Scheiben außerhalb ihrer natürlichen Position gefunden werden? (Jede beliebige Anzahl von Nicht-Primzahl-Scheiben kann auch in oder außerhalb ihrer natürlichen Position gefunden werden.) -Give your answer rounded to 12 places behind the decimal point in the form 0.abcdefghijkl. +Gib deine Antwort gerundet auf 12 Dezimalstellen hinter dem Komma in Form von 0.abcdefghijkl an. # --hints-- -`twentyTwoFoolishPrimes()` should return `0.001887854841`. +`twentyTwoFoolishPrimes()` sollte `0.001887854841` zurückgeben. ```js assert.strictEqual(twentyTwoFoolishPrimes(), 0.001887854841); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-240-top-dice.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-240-top-dice.md index 97f89f17305..858ec226c60 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-240-top-dice.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-240-top-dice.md @@ -8,17 +8,17 @@ dashedName: problem-240-top-dice # --description-- -There are 1111 ways in which five 6-sided dice (sides numbered 1 to 6) can be rolled so that the top three sum to 15. Some examples are: +There are 1111 ways in which five 6-sided dice (sides numbered 1 to 6) can be rolled so that the top three sum to 15. Einige Beispiele sind: $$\begin{align} & D_1,D_2,D_3,D_4,D_5 = 4,3,6,3,5 \\\\ & D_1,D_2,D_3,D_4,D_5 = 4,3,3,5,6 \\\\ & D_1,D_2,D_3,D_4,D_5 = 3,3,3,6,6 \\\\ & D_1,D_2,D_3,D_4,D_5 = 6,6,3,3,3 \end{align}$$ -In how many ways can twenty 12-sided dice (sides numbered 1 to 12) be rolled so that the top ten sum to 70? +Auf wie viele Arten können zwanzig 12-seitige Würfel (mit den Seitenzahlen 1 bis 12) so gewürfelt werden, dass die Summe der obersten zehn Würfel 70 ergibt? # --hints-- -`topDice()` should return `7448717393364182000`. +`topDice()` sollte `7448717393364182000` zurückgeben. ```js assert.strictEqual(topDice(), 7448717393364182000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-253-tidying-up.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-253-tidying-up.md index 3dbeca51b38..d9120daa9d3 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-253-tidying-up.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-253-tidying-up.md @@ -1,6 +1,6 @@ --- id: 5900f4691000cf542c50ff7c -title: 'Problem 253: Tidying up' +title: 'Problem 253: Aufräumen' challengeType: 1 forumTopicId: 301901 dashedName: problem-253-tidying-up @@ -8,28 +8,28 @@ dashedName: problem-253-tidying-up # --description-- -A small child has a "number caterpillar" consisting of forty jigsaw pieces, each with one number on it, which, when connected together in a line, reveal the numbers 1 to 40 in order. +Ein kleines Kind hat eine "Zahlenraupe", die aus vierzig Puzzlestücken besteht, auf denen jeweils eine Zahl steht, die, wenn sie in einer Reihe zusammengefügt werden, die Zahlen 1 bis 40 ergeben. -Every night, the child's father has to pick up the pieces of the caterpillar that have been scattered across the play room. He picks up the pieces at random and places them in the correct order. +Jeden Abend muss der Vater des Kindes die Teile der Raupe aufsammeln, die im Spielzimmer verstreut sind. Er hebt die Teile nach dem Zufallsprinzip auf und bringt sie in die richtige Reihenfolge. -As the caterpillar is built up in this way, it forms distinct segments that gradually merge together. The number of segments starts at zero (no pieces placed), generally increases up to about eleven or twelve, then tends to drop again before finishing at a single segment (all pieces placed). +Während die Raupe auf diese Weise aufgebaut wird, bildet sie verschiedene Segmente, die allmählich ineinander übergehen. Die Anzahl der Segmente beginnt bei Null (keine Spielsteine), steigt im Allgemeinen auf etwa elf oder zwölf an und nimmt dann wieder ab, bevor sie bei einem einzigen Segment endet (alle Spielsteine sind platziert). -For example: +Zum Beispiel: -| Piece Placed | Segments So Far | -| ------------ | --------------- | -| 12 | 1 | -| 4 | 2 | -| 29 | 3 | -| 6 | 4 | -| 34 | 5 | -| 5 | 4 | -| 35 | 4 | -| … | … | +| Piece Placed | Bisherige Segmente | +| ------------ | ------------------ | +| 12 | 1 | +| 4 | 2 | +| 29 | 3 | +| 6 | 4 | +| 34 | 5 | +| 5 | 4 | +| 35 | 4 | +| … | … | -Let $M$ be the maximum number of segments encountered during a random tidy-up of the caterpillar. For a caterpillar of ten pieces, the number of possibilities for each $M$ is +Lasse $M$ die maximale Anzahl von Segmenten sein, die beim Aufräumen der Raupe zufällig gefunden werden. Bei einer zehnteiligen Raupe ist die Anzahl der Möglichkeiten für jedes $M$ -| M | Possibilities | +| M | Möglichkeiten | | - | ------------- | | 1 | 512 | | 2 | 250912 | @@ -37,13 +37,13 @@ Let $M$ be the maximum number of segments encountered during a random tidy-up of | 4 | 1418112 | | 5 | 144000 | -so the most likely value of $M$ is 3 and the average value is $\frac{385\\,643}{113\\,400} = 3.400732$, rounded to six decimal places. +der wahrscheinlichste Wert von $M$ ist also 3 und der Durchschnittswert ist $\frac{385\\,643}{113\\,400} = 3,400732$, gerundet auf sechs Dezimalstellen. -The most likely value of $M$ for a forty-piece caterpillar is 11; but what is the average value of $M$? Give your answer rounded to six decimal places. +Der wahrscheinlichste Wert von $M$ für eine vierzigteilige Raupe ist 11; aber was ist der durchschnittliche Wert von $M$? Gib deine Antwort auf sechs Dezimalstellen gerundet an. # --hints-- -`tidyingUp()` should return `11.492847`. +`tidyingUp()` sollte `11.492847` zurückgeben. ```js assert.strictEqual(tidyingUp(), 11.492847); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.md index 3d91777d0a4..4c938f1945f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-254-sums-of-digit-factorials.md @@ -8,21 +8,21 @@ dashedName: problem-254-sums-of-digit-factorials # --description-- -Define $f(n)$ as the sum of the factorials of the digits of $n$. For example, $f(342) = 3! + 4! + 2! = 32$. +Define $f(n)$ as the sum of the factorials of the digits of $n$. Zum Beispiel, $f(342) = 3! + 4! + 2! = 32$. -Define $sf(n)$ as the sum of the digits of $f(n)$. So $sf(342) = 3 + 2 = 5$. +Definiere $sf(n)$ als die Summe der Ziffern von $f(n)$. Also $sf(342) = 3 + 2 = 5$. -Define $g(i)$ to be the smallest positive integer $n$ such that $sf(n) = i$. Though $sf(342)$ is 5, $sf(25)$ is also 5, and it can be verified that $g(5)$ is 25. +Definiere $g(i)$ als die kleinste positive Ganzzahl $n$, so dass $sf(n) = i$. Obwohl $sf(342)$ 5 ist, ist $sf(25)$ auch 5, und es kann nachgewiesen werden, dass $g(5)$ 25 ist. -Define $sg(i)$ as the sum of the digits of $g(i)$. So $sg(5) = 2 + 5 = 7$. +Definiere $sg(i)$ als eine Summe von Ziffern von $g(i)$. Also $sg(5) = 2 + 5 = 7$. -Further, it can be verified that $g(20)$ is 267 and $\sum sg(i)$ for $1 ≤ i ≤ 20$ is 156. +Des Weiteren kann nachgewiesen werden, dass $g(20)$ 267 und $\sum sg(i)$ für $1 ≤ i ≤ 20$ is 156 ist. -What is $\sum sg(i)$ for $1 ≤ i ≤ 150$? +Was ist $\sum sg(i)$ für $1 ≤ i ≤ 150$? # --hints-- -`sumsOfDigitFactorials()` should return `8184523820510`. +`sumsOfDigitFactorials()` sollte `8184523820510` zurückgeben. ```js assert.strictEqual(sumsOfDigitFactorials(), 8184523820510); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-255-rounded-square-roots.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-255-rounded-square-roots.md index abfbcfe2047..f18a9d0f9ea 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-255-rounded-square-roots.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-255-rounded-square-roots.md @@ -1,6 +1,6 @@ --- id: 5900f46d1000cf542c50ff7f -title: 'Problem 255: Rounded Square Roots' +title: 'Problem 255: Gerundete Quadratwurzeln' challengeType: 1 forumTopicId: 301903 dashedName: problem-255-rounded-square-roots @@ -8,40 +8,40 @@ dashedName: problem-255-rounded-square-roots # --description-- -We define the rounded-square-root of a positive integer $n$ as the square root of $n$ rounded to the nearest integer. +Wir definieren die gerundete Quadratwurzel einer positiven ganzen Zahl $n$ als die Quadratwurzel von $n$, gerundet auf die nächste ganze Zahl. -The following procedure (essentially Heron's method adapted to integer arithmetic) finds the rounded-square-root of $n$: +Die folgende Prozedur (im Wesentlichen die Methode von Heron, angepasst an die ganzzahlige Arithmetik) findet die gerundete Quadratwurzel von $n$: -Let $d$ be the number of digits of the number $n$. +Lasse $d$ die Anzahl der Ziffern der Zahl $n$ sein. -If $d$ is odd, set $x_0 = 2 × {10}^{\frac{d - 1}{2}}$. +Falls $d$ ungerade ist, setze $x_0 = 2 × {10}^{\frac{d - 1}{2}}}$. -If $d$ is even, set $x_0 = 7 × {10}^{\frac{d - 2}{2}}$. +Falls $d$ gerade ist, setze $x_0 = 7 × {10}^{d - 2}{2}}$. -Repeat: +Wiederhole: $$x_{k + 1} = \left\lfloor\frac{x_k + \left\lceil\frac{n}{x_k}\right\rceil}{2}\right\rfloor$$ -until $x_{k + 1} = x_k$. +bis $x_{k + 1} = x_k$. -As an example, let us find the rounded-square-root of $n = 4321$. +Als Beispiel wollen wir die gerundete Quadratwurzel von $n = 4321$ finden. -$n$ has 4 digits, so $x_0 = 7 × {10}^{\frac{4-2}{2}} = 70$. +$n$ hat 4 Ziffern, also $x_0 = 7 × {10}^{frac{4-2}{2}}} = 70$. $$x_1 = \left\lfloor\frac{70 + \left\lceil\frac{4321}{70}\right\rceil}{2}\right\rfloor = 66 \\\\ x_2 = \left\lfloor\frac{66 + \left\lceil\frac{4321}{66}\right\rceil}{2}\right\rfloor = 66$$ -Since $x_2 = x_1$, we stop here. So, after just two iterations, we have found that the rounded-square-root of 4321 is 66 (the actual square root is 65.7343137…). +Da $x_2 = x_1$ ist, hören wir hier auf. Nach nur zwei Iterationen haben wir also festgestellt, dass die gerundete Quadratwurzel von 4321 66 ist (die tatsächliche Quadratwurzel ist 65,7343137...). -The number of iterations required when using this method is surprisingly low. For example, we can find the rounded-square-root of a 5-digit integer ($10\\,000 ≤ n ≤ 99\\,999$) with an average of 3.2102888889 iterations (the average value was rounded to 10 decimal places). +Die Anzahl der erforderlichen Iterationen ist bei dieser Methode erstaunlich gering. Zum Beispiel können wir die gerundete Quadratwurzel einer 5-stelligen ganzen Zahl ($10\\.000 ≤ n ≤ 99\\.999$) mit durchschnittlich 3,2102888889 Iterationen finden (der Durchschnittswert wurde auf 10 Dezimalstellen gerundet). -Using the procedure described above, what is the average number of iterations required to find the rounded-square-root of a 14-digit number (${10}^{13} ≤ n < {10}^{14}$)? Give your answer rounded to 10 decimal places. +Wie viele Iterationen sind durchschnittlich erforderlich, um mit dem oben beschriebenen Verfahren die gerundete Quadratwurzel einer 14-stelligen Zahl (${10}^{13} ≤ n < {10}^{14}$) zu finden? Gib deine Antwort auf 10 Dezimalstellen gerundet an. -**Note:** The symbols $⌊x⌋$ and $⌈x⌉$ represent the floor function and ceiling function respectively. +**Hinweis:** Die Symbole $⌊x⌋$ und $⌈x⌉$ stehen für die Aufrundungs-und Abrundungsfunktion. # --hints-- -`roundedSquareRoots()` should return `4.447401118`. +`roundedSquareRoots()` sollte `4.447401118` zurückgeben. ```js assert.strictEqual(roundedSquareRoots(), 4.447401118); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.md index 170443188b8..db33ba7baa9 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-256-tatami-free-rooms.md @@ -8,29 +8,29 @@ dashedName: problem-256-tatami-free-rooms # --description-- -Tatami are rectangular mats, used to completely cover the floor of a room, without overlap. +Tatami sind rechteckige Matten, die verwendet werden, um den Boden eines Raumes vollständig und ohne Überlappung zu bedecken. -Assuming that the only type of available tatami has dimensions 1×2, there are obviously some limitations for the shape and size of the rooms that can be covered. +Wenn man davon ausgeht, dass die einzige verfügbare Art von Tatami die Maße 1×2 hat, sind der Form und Größe der Räume, die abgedeckt werden können, natürlich Grenzen gesetzt. -For this problem, we consider only rectangular rooms with integer dimensions $a$, $b$ and even size $s = a \times b$. We use the term 'size' to denote the floor surface area of the room, and — without loss of generality — we add the condition $a ≤ b$. +Für dieses Problem betrachten wir nur rechteckige Räume mit Ganzzahl-Dimensionen $a$, $b$ und sogar Größe $s = a \times b$. Mit dem Begriff "Größe" bezeichnen wir die Bodenfläche des Raumes, und – ohne Verlust der Allgemeinheit – fügen wir die Bedingung $a ≤ b$ hinzu. -There is one rule to follow when laying out tatami: there must be no points where corners of four different mats meet. For example, consider the two arrangements below for a 4×4 room: +Es gibt eine Regel, die bei der Verlegung von Tatami befolgt werden muss: Es darf keine Punkte geben, an denen sich die Ecken von vier verschiedenen Matten treffen. Betrachte zum Beispiel die folgenden zwei Arrangements für einen 4×4 Raum: -two arrangements of mats in 4x4 room +zwei Anordnungen der Matten in einem 4x4 Raum -The arrangement on the left is acceptable, whereas the one on the right is not: a red "X" in the middle, marks the point where four tatami meet. +Das linke Arrangement ist akzeptabel, das auf der rechten Seite hingegen nicht: Ein rotes X in der Mitte markiert den Punkt, an dem sich vier Tatamis treffen. -Because of this rule, certain even-sized rooms cannot be covered with tatami: we call them tatami-free rooms. Further, we define $T(s)$ as the number of tatami-free rooms of size $s$. +Aufgrund dieser Regel können bestimmte Zimmer nicht mit Tatami bedeckt werden: wir nennen sie Tatami-freie Räume. Weiterhin definieren wir $T(s)$ als die Anzahl der Tatami-freien Räume der Größe $s$. -The smallest tatami-free room has size $s = 70$ and dimensions 7×10. All the other rooms of size $s = 70$ can be covered with tatami; they are: 1×70, 2×35 and 5×14. Hence, $T(70) = 1$. +Der kleinste Tatami-freie Raum hat die Größe $s = 70$ und die Maße 7×10. Alle anderen Räume mit der Größe $s = 70$ können mit Tatami bedeckt werden. Sie haben Maße von 1x70, 2x35 und 5x14. Folglich: $T(70) = 1$. -Similarly, we can verify that $T(1320) = 5$ because there are exactly 5 tatami-free rooms of size $s = 1320$: 20×66, 22×60, 24×55, 30×44 and 33×40. In fact, $s = 1320$ is the smallest room-size $s$ for which $T(s) = 5$. +Ebenso können wir überprüfen, dass $T(1320) = 5$, weil es genau 5 Tatami-freie Räume von Größe $s = 1320$ gibt: 20×66, 22×60, 24×55, 30×44 und 33×40. Tatsächlich ist $s= 1320$ die kleinste Raumgröße $s$, für die $T(s) = 5$. -Find the smallest room-size $s$ for which $T(s) = 200$. +Finde die kleinste Raumgröße $s$, für die $T(n) = 200$. # --hints-- -`tatamiFreeRooms()` should return `85765680`. +`tatamiFreeRooms()` sollte `85765680` zurückgeben. ```js assert.strictEqual(tatamiFreeRooms(), 85765680); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-267-billionaire.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-267-billionaire.md index 8dbe1d8ab66..9864fc8a36e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-267-billionaire.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-267-billionaire.md @@ -1,6 +1,6 @@ --- id: 5900f4771000cf542c50ff8a -title: 'Problem 267: Billionaire' +title: 'Problem 267: Milliardär' challengeType: 1 forumTopicId: 301916 dashedName: problem-267-billionaire @@ -8,21 +8,21 @@ dashedName: problem-267-billionaire # --description-- -You are given a unique investment opportunity. +Du erhälst eine einzigartige Investitionsmöglichkeit. -Starting with £1 of capital, you can choose a fixed proportion, $f$, of your capital to bet on a fair coin toss repeatedly for 1000 tosses. +Wenn du mit einem Kapital von £1 beginnst, kannst du einen festen Anteil $f$ deines Kapitals wählen, um 1000 Mal auf einen fairen Münzwurf zu wetten. -Your return is double your bet for heads and you lose your bet for tails. +Dein Gewinn ist das Doppelte deines Einsatzes bei Kopf und du verlierst deinen Einsatz bei Zahl. -For example, if $f = \frac{1}{4}$, for the first toss you bet £0.25, and if heads comes up you win £0.5 and so then have £1.5. You then bet £0.375 and if the second toss is tails, you have £1.125. +Zum Beispiel, wenn $f = \frac{1}{4}$, setzt du für den ersten Wurf £0.25, wenn Kopf erscheint, gewinnst du £0.5 und hast somit £1.5. Dann setzt du £0.375 und wenn der zweite Wurf Zahl ergibt, hast du £1.125. -Choosing $f$ to maximize your chances of having at least £1,000,000,000 after 1,000 flips, what is the chance that you become a billionaire? +Wenn du $f$ wählst, um deine Chancen zu maximieren, nach 1.000 Umdrehungen mindestens £1.000.000.000 zu besitzen, wie hoch ist dann die Wahrscheinlichkeit, dass du Milliardär wirst? -All computations are assumed to be exact (no rounding), but give your answer rounded to 12 digits behind the decimal point in the form 0.abcdefghijkl. +Alle Berechnungen werden als genau angenommen (keine Rundungen), gebe aber deine Antwort gerundet auf 12 Dezimalstellen hinter dem Komma in der Form 0.abcdefghijkl an. # --hints-- -`billionaire()` should return `0.999992836187`. +`billionaire()` sollte `0.999992836187` zurückgeben. ```js assert.strictEqual(billionaire(), 0.999992836187); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.md index bd295d89e67..fca3ed38a6f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-268-counting-numbers-with-at-least-four-distinct-prime-factors-less-than-100.md @@ -1,7 +1,7 @@ --- id: 5900f4791000cf542c50ff8b title: >- - Problem 268: Counting numbers with at least four distinct prime factors less than 100 + Problem 268: Zählen von Zahlen mit mindestens vier verschiedenen Primfaktoren kleiner als 100 challengeType: 1 forumTopicId: 301917 dashedName: >- @@ -10,13 +10,13 @@ dashedName: >- # --description-- -It can be verified that there are 23 positive integers less than 1000 that are divisible by at least four distinct primes less than 100. +Es kann nachgewiesen werden, dass es 23 positive ganze Zahlen kleiner als 1000 gibt, die durch mindestens vier verschiedene Primzahlen kleiner als 100 teilbar sind. -Find how many positive integers less than ${10}^{16}$ are divisible by at least four distinct primes less than 100. +Finde heraus, wie viele positive ganze Zahlen kleiner als ${10}^{16}$ durch mindestens vier verschiedene Primzahlen kleiner als 100 teilbar sind. # --hints-- -`fourDistinctPrimeFactors()` should return `785478606870985`. +`fourDistinctPrimeFactors()` sollte `785478606870985` zurückgeben. ```js assert.strictEqual(fourDistinctPrimeFactors(), 785478606870985); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.md index 3b66b2a2ab1..169c183b5cf 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-269-polynomials-with-at-least-one-integer-root.md @@ -8,27 +8,27 @@ dashedName: problem-269-polynomials-with-at-least-one-integer-root # --description-- -A root or zero of a polynomial $P(x)$ is a solution to the equation $P(x) = 0$. +Eine Wurzel oder Nullstelle eines Polynoms $P(x)$ ist eine Lösung der Gleichung $P(x) = 0$. -Define $P_n$ as the polynomial whose coefficients are the digits of $n$. +Definiere $P_n$ als das Polynom, dessen Koeffizienten die Ziffern von $n$ sind. -For example, $P_{5703}(x) = 5x^3 + 7x^2 + 3$. +Zum Beispiel: $P_{5703}(x) = 5x^3 + 7x^2 + 3$. -We can see that: +Das können wir sehen: -- $P_n(0)$ is the last digit of $n$, -- $P_n(1)$ is the sum of the digits of $n$, -- $Pn(10)$ is $n$ itself. +- $P_n(0)$ ist die letzte Ziffer von $n$, +- $P_n(1)$ ist die Summe der Ziffern von $n$, +- $Pn(10)$ ist $n$ selbst. -Define $Z(k)$ as the number of positive integers, $n$, not exceeding $k$ for which the polynomial $P_n$ has at least one integer root. +Definiere $Z(k)$ als die Anzahl der positiven ganzen Zahlen $n$, die nicht größer als $k$ sind und für die das Polynom $P_n$ mindestens eine ganzzahlige Wurzel hat. -It can be verified that $Z(100\\,000)$ is 14696. +Es kann überprüft werden, dass $Z(100\\,000)$ 14696 ist. -What is $Z({10}^{16})$? +Was ist $Z({10}^{16})$? # --hints-- -`polynomialsWithOneIntegerRoot()` should return `1311109198529286`. +`polynomialsWithOneIntegerRoot()` sollte `1311109198529286` zurückgeben. ```js assert.strictEqual(polynomialsWithOneIntegerRoot(), 1311109198529286); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-270-cutting-squares.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-270-cutting-squares.md index 0458e257f05..985987a2f7d 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-270-cutting-squares.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-270-cutting-squares.md @@ -8,21 +8,21 @@ dashedName: problem-270-cutting-squares # --description-- -A square piece of paper with integer dimensions $N×N$ is placed with a corner at the origin and two of its sides along the $x$- and $y$-axes. Then, we cut it up respecting the following rules: +Ein quadratisches Stück Papier mit den ganzzahligen Abmessungen $N×N$ wird so hingelegt, dass eine Ecke im Ursprung liegt und zwei seiner Seiten auf den $x$- und $y$-Achsen. Dann schneiden wir es unter Beachtung der folgenden Regeln auf: -- We only make straight cuts between two points lying on different sides of the square, and having integer coordinates. -- Two cuts cannot cross, but several cuts can meet at the same border point. +- Wir machen nur gerade Schnitte zwischen zwei Punkten, die auf verschiedenen Seiten des Quadrats liegen und ganzzahlige Koordinaten haben. +- Zwei Schnitte können sich nicht kreuzen, aber mehrere Schnitte können sich am selben Grenzpunkt treffen. - Proceed until no more legal cuts can be made. -Counting any reflections or rotations as distinct, we call $C(N)$ the number of ways to cut an $N×N$ square. For example, $C(1) = 2$ and $C(2) = 30$ (shown below). +Zählt man alle Spiegelungen oder Drehungen als verschieden, so nennt man $C(N)$ die Anzahl der Möglichkeiten, ein $N×N$-Quadrat zu schneiden. Zum Beispiel ist $C(1) = 2$ und $C(2) = 30$ (siehe unten). -ways to cut 2x2 square, counting reflections and rotations as distinct +Möglichkeiten, ein 2x2-Quadrat zu schneiden, wobei Spiegelungen und Drehungen als getrennt zu betrachten sind -What is $C(30)\bmod {10}^8$ ? +Was ist $C(30)\bmod {10}^8$ ? # --hints-- -`cuttingSquares()` should return `82282080`. +`cuttingSquares()` sollte `82282080` zurückgeben. ```js assert.strictEqual(cuttingSquares(), 82282080); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.md index f1dbf4b5666..2444b83c949 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-271-modular-cubes-part-1.md @@ -1,6 +1,6 @@ --- id: 5900f47b1000cf542c50ff8d -title: 'Problem 271: Modular Cubes, part 1' +title: 'Problem 272: Modulare Würfel, Teil 1' challengeType: 1 forumTopicId: 301921 dashedName: problem-271-modular-cubes-part-1 @@ -8,15 +8,15 @@ dashedName: problem-271-modular-cubes-part-1 # --description-- -For a positive number $n$, define $S(n)$ as the sum of the integers $x$, for which $1 < x < n$ and $x^3 \equiv 1\bmod n$. +Für eine positive Zahl $n$ definiere $S(n)$ als die Summe der ganzen Zahlen $x$, für die $1 < x < n$ und $x^3 \equiv 1\bmod n$. -When $n = 91$, there are 8 possible values for $x$, namely: 9, 16, 22, 29, 53, 74, 79, 81. Thus, $S(91) = 9 + 16 + 22 + 29 + 53 + 74 + 79 + 81 = 363$. +Wenn $n = 91$ ist, gibt es 8 mögliche Werte für $x$, nämlich: 9, 16, 22, 29, 53, 74, 79, 81. Somit ist $S(91) = 9 + 16 + 22 + 29 + 53 + 74 + 79 + 81 = $363. -Find $S(13\\,082\\,761\\,331\\,670\\,030)$. +Finde $S(13\\,082\\,761\\,331\\,670\\,030)$. # --hints-- -`modularCubesOne()` should return `4617456485273130000`. +`modularCubesOne()` sollte `4617456485273130000` zurückgeben. ```js assert.strictEqual(modularCubesOne(), 4617456485273130000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.md index d764ea6563b..e6efd9c1648 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-272-modular-cubes-part-2.md @@ -1,6 +1,6 @@ --- id: 5900f47d1000cf542c50ff8f -title: 'Problem 272: Modular Cubes, part 2' +title: 'Problem 272: Modulare Würfel, Teil 2' challengeType: 1 forumTopicId: 301922 dashedName: problem-272-modular-cubes-part-2 @@ -8,15 +8,15 @@ dashedName: problem-272-modular-cubes-part-2 # --description-- -For a positive number $n$, define $C(n)$ as the number of the integers $x$, for which $1 < x < n$ and $x^3 \equiv 1\bmod n$. +Definiere für eine positive Zahl $n$ $C(n)$ als eine Anzahl der Ganzzahlen $x$, für die $1 < x < n$ und $x^3 \equiv 1\bmod n$ ist. -When $n = 91$, there are 8 possible values for $x$, namely: 9, 16, 22, 29, 53, 74, 79, 81. Thus, $C(91) = 8$. +Wenn $n = 91$, gibt es 8 mögliche Werte für $x$, nämlich: 9, 16, 22, 29, 53, 74, 79, 81. Also $C(91) = 8$. -Find the sum of the positive numbers $n ≤ {10}^{11}$ for which $C(n)=242$. +Finde die Summe der positiven Zahlen $n ≤ {10}^{11}$ für die $C(n)=242$. # --hints-- -`modularCubesTwo()` should return `8495585919506151000`. +`modularCubesTwo()` sollte `8495585919506151000` zurückgeben. ```js assert.strictEqual(modularCubesTwo(), 8495585919506151000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.md index 660d66eabb4..58a019f1c85 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-296-angular-bisector-and-tangent.md @@ -1,6 +1,6 @@ --- id: 5900f4941000cf542c50ffa7 -title: 'Problem 296: Angular Bisector and Tangent' +title: 'Problem 296: Winkelhalbierende und Tangente' challengeType: 1 forumTopicId: 301948 dashedName: problem-296-angular-bisector-and-tangent @@ -8,17 +8,17 @@ dashedName: problem-296-angular-bisector-and-tangent # --description-- -Given is an integer sided triangle $ABC$ with $BC ≤ AC ≤ AB$. $k$ is the angular bisector of angle $ACB$. $m$ is the tangent at $C$ to the circumscribed circle of $ABC$. $n$ is a line parallel to $m$ through $B$. +Es ist ein ganzzahliges Dreieck $ABC$ mit $BC ≤ AC ≤ AB$ gegeben. $k$ ist die Winkelhalbierende des Winkels $ACB$. $m$ ist der Tangent bei $C$ zum begrenzten Kreis von $ABC$. $n$ ist eine Linie parallel zu $m$ durch $B$. -The intersection of $n$ and $k$ is called $E$. +Der Schnittpunkt von $n$ und $k$ heißt $E$. -triangle ABC, with k - the angular bisector of angle ACB, m - tangent at point C, n - line parallel to m through B, and point E - intersection of k and n +dreieck ABC, mit k - der Winkelhalbierenden des Winkels ACB, m - tangent an Punkt C, n - parallel zu m durch B und Punkt E - Kreuzung von k und n -How many triangles $ABC$ with a perimeter not exceeding $100\\,000$ exist such that $BE$ has integral length? +Wie viele Dreiecke $ABC$ mit einem Umkreis von nicht mehr als $100\\,000$ existieren, so dass $BE$ eine integrale Länge hat? # --hints-- -`angularBisectorAndTangent()` should return `1137208419`. +`angularBisectorAndTangent()` sollte `1137208419` zurückgeben. ```js assert.strictEqual(angularBisectorAndTangent(), 1137208419); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md index 55f3adbfd1c..8f168658b0b 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-297-zeckendorf-representation.md @@ -8,25 +8,25 @@ dashedName: problem-297-zeckendorf-representation # --description-- -Each new term in the Fibonacci sequence is generated by adding the previous two terms. +Jedes neue Element in der Fibonacci-Folge wird durch Zusatz der beiden vorherigen Elemente erzeugt. -Starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89. +Beginnend mit 1 und 2 werden die ersten 10 Elemente lauten: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89. -Every positive integer can be uniquely written as a sum of nonconsecutive terms of the Fibonacci sequence. For example, 100 = 3 + 8 + 89. +Jeder positive Integer kann einzigartig als Summe aufeinanderfolgender Elemente der Fibonacci Folge geschrieben werden. For example, 100 = 3 + 8 + 89. -Such a sum is called the Zeckendorf representation of the number. +Eine solche Summe nennt man Zeckendorf Repräsentation der Zahl. -For any integer $n>0$, let $z(n)$ be the number of terms in the Zeckendorf representation of $n$. +Für jede Ganzzahl $n>0$, lass $z(n)$ die Anzahl der Begriffe in der Zeckendorf-Darstellung von $n$ sein. Thus, $z(5) = 1$, $z(14) = 2$, $z(100) = 3$ etc. -Also, for $0 < n < {10}^6$, $\sum z(n) = 7\\,894\\,453$. +Auch für $0 < n < {10}^6$, $\sum z(n) = 7\\,894\\,453$. -Find $\sum z(n)$ for $0 < n < {10}^{17}$. +Finde $\sum z(n)$ für $0 < n < {10}^{17}$. # --hints-- -`zeckendorfRepresentation()` should return `2252639041804718000`. +`zeckendorfRepresentation()` sollte `2252639041804718000` zurückgeben. ```js assert.strictEqual(zeckendorfRepresentation(), 2252639041804718000); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.md index 5419f2f8270..000b3773d60 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-33-digit-cancelling-fractions.md @@ -8,23 +8,23 @@ dashedName: problem-33-digit-cancelling-fractions # --description-- -The fraction 49/98 is a curious fraction, as an inexperienced mathematician in attempting to simplify it may incorrectly believe that 49/98 = 4/8, which is correct, is obtained by cancelling the 9s. +Der Bruch 49/98 ist ein merkwürdiger Bruch, da ein unerfahrener Mathematiker bei dem Versuch ihn zu verkürzen, fälschlicherweise glauben könnte, dass 49/98 = 4/8, was korrekt ist und durch die Kürzung der 9er herauskommt. -We shall consider fractions like, 30/50 = 3/5, to be trivial examples. +Wir werden Brüche wie 30/50 = 3/5, als triviale Beispiele betrachten. -There are exactly four non-trivial examples of this type of fraction, less than one in value, and containing two digits in the numerator and denominator. +Es gibt genau vier nicht-triviale Beispiele für diese Art von Brüchen, deren Wert kleiner als eins ist und die zwei Ziffern im Zähler und im Nenner enthalten. -If the product of these four fractions is given in its lowest common terms, find the value of the denominator. +Wenn das Produkt dieser vier Brüche mit den kleinsten gemeinsamen Werten angegeben wird, finden Sie den Wert des Nenners. # --hints-- -`digitCancellingFractions()` should return a number. +`digitCancellingFractions()` sollte eine Zahl zurückgeben. ```js assert(typeof digitCancellingFractions() === 'number'); ``` -`digitCancellingFractions()` should return 100. +`digitCancellingFractions()` sollte 100 zurückgeben. ```js assert.strictEqual(digitCancellingFractions(), 100); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-34-digit-factorials.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-34-digit-factorials.md index 2eb87f93ba1..495d83b9bfa 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-34-digit-factorials.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-34-digit-factorials.md @@ -8,21 +8,21 @@ dashedName: problem-34-digit-factorials # --description-- -145 is a curious number, as 1! + 4! + 5! = 1 + 24 + 120 = 145. +145 ist eine merkwürdige Zahl, denn 1! + 4! + 5! = 1 + 24 + 120 = 145. -Find the numbers and the sum of the numbers which are equal to the sum of the factorial of their digits. +Finde die Zahlen und die Summe der Zahlen, die gleich der Summe der Fakultäten ihrer Ziffern sind. -**Note:** as 1! = 1 and 2! = 2 are not sums they are not included. +**Hinweis:** Da 1! = 1 und 2! = 2 keine Summen sind, werden sie nicht berücksichtigt. # --hints-- -`digitFactorial()` should return an object. +`digitFactorial()` sollte ein Objekt zurückgeben. ```js assert.typeOf(digitFactorial(), 'object'); ``` -`digitFactorial()` should return { sum: 40730, numbers: [145, 40585] }. +`digitFactorial()` sollte { sum: 40730, Zahlen: [145, 40585] }. ```js assert.deepEqual(digitFactorial(), { sum: 40730, numbers: [145, 40585] }); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-35-circular-primes.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-35-circular-primes.md index aaae9562bb0..6802c96708f 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-35-circular-primes.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-35-circular-primes.md @@ -1,6 +1,6 @@ --- id: 5900f38f1000cf542c50fea2 -title: 'Problem 35: Circular primes' +title: 'Problem 35: Kreisförmige Primzahlen' challengeType: 1 forumTopicId: 302009 dashedName: problem-35-circular-primes @@ -8,55 +8,55 @@ dashedName: problem-35-circular-primes # --description-- -The number, 197, is called a circular prime because all rotations of the digits: 197, 971, and 719, are themselves prime. +Die Zahl 197 wird als kreisförmige Primzahl bezeichnet, weil alle Drehungen der Ziffern: 197, 971, und 719, selbst Primzahlen sind. -There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. +Es gibt dreizehn solcher Primzahlen unter 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79 und 97. -How many circular primes are there below `n`, whereas 100 ≤ `n` ≤ 1000000? +Wie viele kreisförmige Primzahlen gibt es unter `n`, wobei 100 ≤ `n` ≤ 1000000? -**Note:** +**Hinweis:** -Circular primes individual rotation can exceed `n`. +Kreisförmige Primzahlen können eine individuelle Drehung von `n` überschreiten. # --hints-- -`circularPrimes(100)` should return a number. +`circularPrimes(100)` sollte eine Zahl zurückgeben. ```js assert(typeof circularPrimes(100) === 'number'); ``` -`circularPrimes(100)` should return 13. +`circularPrimes(100)` sollte 13 ergeben. ```js assert(circularPrimes(100) == 13); ``` -`circularPrimes(100000)` should return 43. +`circularPrimes(100000)` sollte 43 zurückgeben. ```js assert(circularPrimes(100000) == 43); ``` -`circularPrimes(250000)` should return 45. +`circularPrimes(250000)` sollte 45 zurückgeben. ```js assert(circularPrimes(250000) == 45); ``` -`circularPrimes(500000)` should return 49. +`circularPrimes(500000)` sollte 49 zurückgeben. ```js assert(circularPrimes(500000) == 49); ``` -`circularPrimes(750000)` should return 49. +`circularPrimes(750000)` sollte 49 zurückgeben. ```js assert(circularPrimes(750000) == 49); ``` -`circularPrimes(1000000)` should return 55. +`circularPrimes(1000000)` sollte 55 zurückgeben. ```js assert(circularPrimes(1000000) == 55); diff --git a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-36-double-base-palindromes.md b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-36-double-base-palindromes.md index 9793d760c20..5faade3f02e 100644 --- a/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-36-double-base-palindromes.md +++ b/curriculum/challenges/german/10-coding-interview-prep/project-euler/problem-36-double-base-palindromes.md @@ -1,6 +1,6 @@ --- id: 5900f3901000cf542c50fea3 -title: 'Problem 36: Double-base palindromes' +title: 'Problem 36: Doppelte Palindrome' challengeType: 1 forumTopicId: 302020 dashedName: problem-36-double-base-palindromes @@ -8,39 +8,39 @@ dashedName: problem-36-double-base-palindromes # --description-- -The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. +Die Dezimalzahl 585 = 10010010012 (binär), ist von beiden Seiten palindromisch. -Find the sum of all numbers, less than `n`, whereas 1000 ≤ `n` ≤ 1000000, which are palindromic in base 10 and base 2. +Finde die Summe aller Zahlen, die kleiner sind als `n`, wobei 1000 ≤ `n` ≤ 1000000, die in 10 und 2 palindromisch sind. -(Please note that the palindromic number, in either base, may not include leading zeros.) +(Bitte beachte, dass die palindromische Zahl in beiden Basen keine führenden Nullen enthalten darf) # --hints-- -`doubleBasePalindromes(1000)` should return a number. +`doubleBasePalindromes(1000)` sollte eine Zahl zurückgeben. ```js assert(typeof doubleBasePalindromes(1000) === 'number'); ``` -`doubleBasePalindromes(1000)` should return 1772. +`doubleBasePalindromes(1000)` sollte 1772 zurückgeben. ```js assert(doubleBasePalindromes(1000) == 1772); ``` -`doubleBasePalindromes(50000)` should return 105795. +`doubleBasePalindromes(50000)` sollte 105795 zurückgeben. ```js assert(doubleBasePalindromes(50000) == 105795); ``` -`doubleBasePalindromes(500000)` should return 286602. +`doubleBasePalindromes(500000)` sollte 286602 zurückgeben. ```js assert(doubleBasePalindromes(500000) == 286602); ``` -`doubleBasePalindromes(1000000)` should return 872187. +`doubleBasePalindromes(1000000)` sollte 872187 zurückgeben. ```js assert(doubleBasePalindromes(1000000) == 872187); diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md index a0e6ab8350f..80edd482057 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -Tutti i 24 test unitari sono completati e superati. Vedi `/tests/1_unit-tests.js` per il comportamento previsto per il quale dovresti scrivere dei test. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -Tutti i 6 test funzionali sono completi e superati. Vedi `/tests/2_functional-tests.js` per le funzionalità per le quali dovresti scrivere dei test. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index b71706cd32a..2bc6d2882ad 100644 --- a/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/italian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -Tutti i 12 test funzionali richiesti sono completi e superati. Vedi `/tests/1_unit-tests.js` per il comportamento previsto per il quale dovresti scrivere dei test. +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -Tutti i 14 test funzionali richiesti sono completi e superati. Vedi `/tests/2_functional-tests.js` per le funzionalità attese per le quali dovresti scrivere dei test. +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md index de255811e07..e3525a8ea33 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-and-testing-with-chai/learn-how-javascript-assertions-work.md @@ -24,11 +24,11 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ # --instructions-- -Within `tests/1_unit-tests.js` under the test labelled `#1` in the `Basic Assertions` suite, change each `assert` to either `assert.isNull` or `assert.isNotNull` to make the test pass (should evaluate to `true`). Do not alter the arguments passed to the asserts. +`tests/1_unit-tests.js` の中で、`Basic Assertions` スイート内の `#1` と書かれているテストについて、それぞれの `assert` を `assert.isNull` または `assert.isNotNull` に変更し、テストを成功させてください (`true` と評価されるようにしてください)。 アサートに渡された引数は変更しないでください。 # --hints-- -All tests should pass. +すべてのテストが成功する必要があります。 ```js (getUserInput) => @@ -42,7 +42,7 @@ All tests should pass. ); ``` -You should choose the correct method for the first assertion - `isNull` vs. `isNotNull`. +最初のアサーションに対して、正しいメソッドを選ぶ必要があります - `isNull` もしくは `isNotNull` です。 ```js (getUserInput) => @@ -56,7 +56,7 @@ You should choose the correct method for the first assertion - `isNull` vs. `isN ); ``` -You should choose the correct method for the second assertion - `isNull` vs. `isNotNull`. +2 番目のアサーションに対して、正しいメソッドを選ぶ必要があります- `isNull` もしくは `isNotNull` です。 ```js (getUserInput) => diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 285dbe0b3af..189c63b64db 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -24,11 +24,11 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ # --instructions-- -- All logic can go into `/components/translator.js` -- Complete the `/api/translate` route in `/routes/api.js` -- Create all of the unit/functional tests in `tests/1_unit-tests.js` and `tests/2_functional-tests.js` -- See the JavaScript files in `/components` for the different spelling and terms your application should translate -- To run the tests on Replit, set `NODE_ENV` to `test` without quotes in the `.env` file +- すべてのロジックを `/components/translator.js` に記述してください。 +- `/routes/api.js` で `/api/translate` ルートを完成させてください。 +- `tests/1_unit-tests.js` および `tests/2_functional-tests.js` に、すべてのユニットテスト/機能テストを作成してください。 +- アプリで変換すべきスペルと用語については、`/components` にある JavaScript ファイルを参照してください。 +- Replit でテストを実行するには、`.env` ファイル内で `NODE_ENV` を `test` (引用符は付けない) に設定してください。 - コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 `tests/1_unit-tests.js` に以下のテストを記述してください。 @@ -60,12 +60,12 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ 次のテストを `tests/2_functional-tests.js` に記述してください。 -- Translation with text and locale fields: POST request to `/api/translate` -- Translation with text and invalid locale field: POST request to `/api/translate` -- Translation with missing text field: POST request to `/api/translate` -- Translation with missing locale field: POST request to `/api/translate` -- Translation with empty text: POST request to `/api/translate` -- Translation with text that needs no translation: POST request to `/api/translate` +- text フィールドと locale フィールドを指定した変換: `/api/translate` への POST リクエスト +- text フィールドと、無効な locale フィールドを指定した変換: `/api/translate` への POST リクエスト +- text フィールドが不足している変換: `/api/translate` への POST リクエスト +- locale フィールドが不足している変換: `/api/translate` への POST リクエスト +- 空のテキストの変換: `/api/translate` への POST リクエスト +- 変換不要テキストの変換: `/api/translate` への POST リクエスト # --hints-- @@ -81,7 +81,7 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ }; ``` -You can `POST` to `/api/translate` with a body containing `text` with the text to translate and `locale` with either `american-to-british` or `british-to-american`. The returned object should contain the submitted `text` and `translation` with the translated text. +`text` に変換するテキスト、`locale` に `american-to-british` または `british-to-american` のいずれかを含むボディを使用して、`/api/translate` へ `POST` できます。 返されるオブジェクトには、送信した `text` と、変換後のテキストを含む `translation` が含まれている必要があります。 ```js async (getUserInput) => { @@ -109,7 +109,7 @@ async (getUserInput) => { }; ``` -The `/api/translate` route should handle the way time is written in American and British English. For example, ten thirty is written as "10.30" in British English and "10:30" in American English. The `span` element should wrap the entire time string, i.e. `10:30`. +`/api/translate` ルートでは、アメリカ英語とイギリス英語の時間の記述方法を扱えるようにしてください。 たとえば、10 時 30 分は、イギリス英語では「10.30」、アメリカ英語では「10:30」と記述します。 `span` 要素に時間の文字列全体を含める必要があります。たとえば、`10:30` などとします。 ```js async (getUserInput) => { @@ -136,7 +136,7 @@ async (getUserInput) => { }; ``` -The `/api/translate` route should also handle the way titles/honorifics are abbreviated in American and British English. For example, Doctor Wright is abbreviated as "Dr Wright" in British English and "Dr. Wright" in American English. See `/components/american-to-british-titles.js` for the different titles your application should handle. +`/api/translate` ルートでは、アメリカ英語とイギリス英語の肩書や敬称の略記を扱えるようにしてください。 たとえば、Doctor Wright は、イギリス英語では「Dr Wright」、アメリカ英語では「Dr. Wright」と 略記します。 アプリが変換できるようにすべき肩書については、`/components/american-to-british-titles.js` を参照してください。 ```js async (getUserInput) => { @@ -163,7 +163,7 @@ async (getUserInput) => { }; ``` -Wrap any translated spelling or terms with `...` tags so they appear in green. +変換されたスペルや用語が緑色で表示されるように、`...` タグで囲んでください。 ```js async (getUserInput) => { @@ -191,7 +191,7 @@ async (getUserInput) => { }; ``` -If one or more of the required fields is missing, return `{ error: 'Required field(s) missing' }`. +1 つ以上の必須フィールドが不足している場合は、`{ error: 'Required field(s) missing' }` を返します。 ```js async (getUserInput) => { @@ -212,7 +212,7 @@ async (getUserInput) => { }; ``` -If `text` is empty, return `{ error: 'No text to translate' }` +`text` が空の場合は、`{ error: 'No text to translate' }` を返します。 ```js async (getUserInput) => { @@ -233,7 +233,7 @@ async (getUserInput) => { }; ``` -If `locale` does not match one of the two specified locales, return `{ error: 'Invalid value for locale field' }`. +`locale` が指定のロケール 2 種類のいずれとも一致しない場合は、`{ error: 'Invalid value for locale field' }` を返します。 ```js async (getUserInput) => { @@ -255,7 +255,7 @@ async (getUserInput) => { }; ``` -If `text` requires no translation, return `"Everything looks good to me!"` for the `translation` value. +`text` が変換を必要としない場合は、`translation` の値として `"Everything looks good to me!"` を返します。 ```js async (getUserInput) => { @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -All 24 unit tests are complete and passing. See `/tests/1_unit-tests.js` for the expected behavior you should write tests for. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -All 6 functional tests are complete and passing. See `/tests/2_functional-tests.js` for the functionality you should write tests for. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md index f1126ff047e..39967b37805 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/issue-tracker.md @@ -14,17 +14,17 @@ dashedName: issue-tracker - Replit スタータープロジェクトを使用して、プロジェクトを完了させる。 - 使い慣れたサイトビルダーを使用してプロジェクトを完了させる。 必ず GitHub リポジトリのすべてのファイルを取り込む。 -If you use Replit, follow these steps to set up the project: +Replit を使用する場合は、下記の手順でプロジェクトをセットアップしてください。 -- Start by importing the project on Replit. -- Next, you will see a `.replit` window. -- Select `Use run command` and click the `Done` button. +- まず、Replit でプロジェクトをインポートします。 +- すると、`.replit` ファイルのウィンドウが表示されます。 +- `Use run command` を選択して `Done` ボタンをクリックします。 -When you are done, make sure a working demo of your project is hosted somewhere public. Then submit the URL to it in the Solution Link field. 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 +完了したら、プロジェクトの動作デモをどこか公開の場にホストしてください。 そして「回答のリンク」欄に、デモの URL を提出してください。 必要に応じて、プロジェクトのソースコードへのリンクも「GitHub のリンク」欄に提出してください。 # --instructions-- -- Complete the necessary routes in `/routes/api.js` +- `/routes/api.js` で、必要なルートを完成させてください。 - `tests/2_functional-tests.js` にすべての機能テストを作成してください。 - `sample.env` ファイルを `.env` ファイルにコピーし、変数を適切に設定してください。 - テストを実行するには、`.env` ファイルの `NODE_ENV=test` をコメント解除してください。 @@ -32,20 +32,20 @@ When you are done, make sure a working demo of your project is hosted somewhere `tests/2_functional-tests.js` に次のテストを記述してください。 -- Create an issue with every field: POST request to `/api/issues/{project}` -- Create an issue with only required fields: POST request to `/api/issues/{project}` -- Create an issue with missing required fields: POST request to `/api/issues/{project}` -- View issues on a project: GET request to `/api/issues/{project}` -- View issues on a project with one filter: GET request to `/api/issues/{project}` -- View issues on a project with multiple filters: GET request to `/api/issues/{project}` -- Update one field on an issue: PUT request to `/api/issues/{project}` -- Update multiple fields on an issue: PUT request to `/api/issues/{project}` -- Update an issue with missing `_id`: PUT request to `/api/issues/{project}` -- Update an issue with no fields to update: PUT request to `/api/issues/{project}` -- Update an issue with an invalid `_id`: PUT request to `/api/issues/{project}` -- Delete an issue: DELETE request to `/api/issues/{project}` -- Delete an issue with an invalid `_id`: DELETE request to `/api/issues/{project}` -- Delete an issue with missing `_id`: DELETE request to `/api/issues/{project}` +- すべてのフィールドを指定して課題を作成する: `/api/issues/{project}` への POST リクエスト +- 必須フィールドのみを指定して課題を作成する: `/api/issues/{project}` への POST リクエスト +- 必須フィールドが不足した状態で課題を作成する: `/api/issues/{project}` への POST リクエスト +- プロジェクトの課題を表示する: `/api/issues/{project}` への GET リクエスト +- プロジェクトの課題を、フィルターを 1 つ指定して表示する: `/api/issues/{project}` への GET リクエスト +- プロジェクトの課題を、フィルターを複数指定して表示する: `/api/issues/{project}` への GET リクエスト +- 課題のフィールドを 1 つ更新する: `/api/issues/{project}` への PUT リクエスト +- 課題の複数フィールドを更新する: `/api/issues/{project}` への PUT リクエスト +- `_id` が不足している状態で課題を更新する: `/api/issues/{project}` への PUT リクエスト +- 更新すべきフィールドがない状態で課題を更新する: `/api/issues/{project}` への PUT リクエスト +- 無効な `_id` を使用して課題を更新する: `/api/issues/{project}` への PUT リクエスト +- 課題を削除する: `/api/issues/{project}` への DELETE リクエスト +- 無効な `_id` を使用して課題を削除する: `/api/issues/{project}` への DELETE リクエスト +- `_id` が不足している状態で課題を削除する: `/api/issues/{project}` への DELETE リクエスト # --hints-- @@ -57,7 +57,7 @@ When you are done, make sure a working demo of your project is hosted somewhere }; ``` -You can send a `POST` request to `/api/issues/{projectname}` with form data containing the required fields `issue_title`, `issue_text`, `created_by`, and optionally `assigned_to` and `status_text`. +必須フィールド `issue_title`、`issue_text`、`created_by`、およびオプションフィールド `assigned_to` および `status_text` を含むフォームデータを使用して、`/api/issues/{projectname}` へ `POST` リクエストを送信することができます。 ```js async (getUserInput) => { @@ -79,7 +79,7 @@ async (getUserInput) => { }; ``` -The `POST` request to `/api/issues/{projectname}` will return the created object, and must include all of the submitted fields. Excluded optional fields will be returned as empty strings. Additionally, include `created_on` (date/time), `updated_on` (date/time), `open` (boolean, `true` for open - default value, `false` for closed), and `_id`. +`/api/issues/{projectname}` への `POST` リクエストは、そのリクエストで作成されたオブジェクトを返します。また、送信したすべてのフィールドが含まれている必要があります。 除外したオプションフィールドは空の文字列として返します。 さらに、`created_on` (日付/時間)、`updated_on` (日付/時間)、`open` (ブール値、open の場合は `true` (こちらがデフォルト値) 、closed の場合は `false`) および `_id` を含めてください。 ```js async (getUserInput) => { @@ -113,7 +113,7 @@ async (getUserInput) => { }; ``` -If you send a `POST` request to `/api/issues/{projectname}` without the required fields, returned will be the error `{ error: 'required field(s) missing' }` +`/api/issues/{projectname}` への `POST` リクエストを必須フィールドなしで送信した場合は、エラー `{ error: 'required field(s) missing' }` を返します。 ```js async (getUserInput) => { @@ -131,7 +131,7 @@ async (getUserInput) => { }; ``` -You can send a `GET` request to `/api/issues/{projectname}` for an array of all issues for that specific `projectname`, with all the fields present for each issue. +`/api/issues/{projectname}` へ `GET` リクエストを送信して、特定の `projectname` に対するすべての課題の配列 (課題ごとに存在するすべてのフィールドを含む) を取得できます。 ```js async (getUserInput) => { @@ -178,7 +178,7 @@ async (getUserInput) => { }; ``` -You can send a `GET` request to `/api/issues/{projectname}` and filter the request by also passing along any field and value as a URL query (ie. `/api/issues/{project}?open=false`). You can pass one or more field/value pairs at once. +`/api/issues/{projectname}` へ `GET` リクエストを送信し、任意のフィールドと値を URL クエリとして渡すことにより、リクエストをフィルターで絞り込むことができます (例: `/api/issues/{project}?open=false`)。 1 つ以上のフィールド/値のペアを一度に渡すことができます。 ```js async (getUserInput) => { @@ -219,7 +219,7 @@ async (getUserInput) => { }; ``` -You can send a `PUT` request to `/api/issues/{projectname}` with an `_id` and one or more fields to update. On success, the `updated_on` field should be updated, and returned should be `{ result: 'successfully updated', '_id': _id }`. +`_id` と 1 つ 以上の更新対象のフィールドを指定して、`/api/issues/{projectname}` へ `PUT` リクエストを送信することができます。 成功した場合は、`updated_on` フィールドを更新し、`{ result: 'successfully updated', '_id': _id }` を返す必要があります。 ```js async (getUserInput) => { @@ -254,7 +254,7 @@ async (getUserInput) => { }; ``` -When the `PUT` request sent to `/api/issues/{projectname}` does not include an `_id`, the return value is `{ error: 'missing _id' }`. +`/api/issues/{projectname}` へ送信した `PUT` リクエストに `_id` が含まれていない場合、戻り値は `{ error: 'missing _id' }` です。 ```js async (getUserInput) => { @@ -270,7 +270,7 @@ async (getUserInput) => { }; ``` -When the `PUT` request sent to `/api/issues/{projectname}` does not include update fields, the return value is `{ error: 'no update field(s) sent', '_id': _id }`. On any other error, the return value is `{ error: 'could not update', '_id': _id }`. +`/api/issues/{projectname}` へ送信した `PUT` リクエストに更新フィールドが含まれていない 場合、戻り値は `{ error: 'no update field(s) sent', '_id': _id }` です。 それ以外のエラーでは、戻り値は `{ error: 'could not update', '_id': _id }` です。 ```js async (getUserInput) => { @@ -300,7 +300,7 @@ async (getUserInput) => { }; ``` -You can send a `DELETE` request to `/api/issues/{projectname}` with an `_id` to delete an issue. If no `_id` is sent, the return value is `{ error: 'missing _id' }`. On success, the return value is `{ result: 'successfully deleted', '_id': _id }`. On failure, the return value is `{ error: 'could not delete', '_id': _id }`. +`_id` を指定して `/api/issues/{projectname}` へ `DELETE` リクエストを送信して、課題を削除することができます。 `_id` が送信されなかった場合、戻り値は `{ error: 'missing _id' }` です。 成功した場合、戻り値は `{ result: 'successfully deleted', '_id': _id }` です。 失敗した場合、戻り値は `{ error: 'could not delete', '_id': _id }` です。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md index 7dcffe5c907..25bf50b68e2 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/metric-imperial-converter.md @@ -24,42 +24,42 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ # --instructions-- -- Complete the necessary conversion logic in `/controllers/convertHandler.js` -- Complete the necessary routes in `/routes/api.js` -- Copy the `sample.env` file to `.env` and set the variables appropriately -- To run the tests uncomment `NODE_ENV=test` in your `.env` file +- `/controllers/convertHandler.js` で、必要な変換ロジックを完成させてください。 +- `/routes/api.js` で、必要なルートを完成させてください。 +- `sample.env` ファイルを `.env` ファイルにコピーし、変数を適切に設定してください。 +- テストを実行するには、`.env` ファイルの `NODE_ENV=test` をコメント解除してください。 - コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 `tests/1_unit-tests.js` に以下のテストを記述してください。 -- `convertHandler` should correctly read a whole number input. -- `convertHandler` should correctly read a decimal number input. -- `convertHandler` should correctly read a fractional input. -- `convertHandler` should correctly read a fractional input with a decimal. -- `convertHandler` should correctly return an error on a double-fraction (i.e. `3/2/3`). -- `convertHandler` should correctly default to a numerical input of `1` when no numerical input is provided. -- `convertHandler` should correctly read each valid input unit. -- `convertHandler` should correctly return an error for an invalid input unit. -- `convertHandler` should return the correct return unit for each valid input unit. -- `convertHandler` should correctly return the spelled-out string unit for each valid input unit. -- `convertHandler` should correctly convert `gal` to `L`. -- `convertHandler` should correctly convert `L` to `gal`. -- `convertHandler` should correctly convert `mi` to `km`. -- `convertHandler` should correctly convert `km` to `mi`. -- `convertHandler` should correctly convert `lbs` to `kg`. -- `convertHandler` should correctly convert `kg` to `lbs`. +- `convertHandler` は、整数の入力を正しく読み取る必要があります。 +- `convertHandler` は、小数の入力を正しく読み取る必要があります。 +- `convertHandler` は、分数の入力を正しく読み取る必要があります。 +- `convertHandler` は、小数を使用した分数の入力を正しく読み取る必要があります。 +- `convertHandler` は、二重分数 (`3/2/3` など) の場合にエラーを正しく返す必要があります。 +- 数値が入力されていない場合、`convertHandler` は、デフォルトで数値 `1` を正しく入力する必要があります。 +- `convertHandler` は、それぞれの有効な入力単位を正しく読み取る必要があります。 +- `convertHandler` は、無効な入力単位の場合にエラーを正しく返す必要があります。 +- `convertHandler` は、有効な入力単位ごとに正しい戻り値の単位を返す必要があります。 +- `convertHandler` は、有効な入力単位ごとに説明の文字列を正しく返す必要があります。 +- `convertHandler` は、`gal` を `L` に正しく変換する必要があります。 +- `convertHandler` は、`L` を `gal` に正しく変換する必要があります。 +- `convertHandler` は、`mi` を `km` に正しく変換する必要があります。 +- `convertHandler` は、`km` を `mi` に正しく変換する必要があります。 +- `convertHandler` は、`lbs` を `kg` に正しく変換する必要があります。 +- `convertHandler` は、`kg` を `lbs` に正しく変換する必要があります。 次のテストを `tests/2_functional-tests.js` に記述してください。 -- Convert a valid input such as `10L`: `GET` request to `/api/convert`. -- Convert an invalid input such as `32g`: `GET` request to `/api/convert`. -- Convert an invalid number such as `3/7.2/4kg`: `GET` request to `/api/convert`. -- Convert an invalid number AND unit such as `3/7.2/4kilomegagram`: `GET` request to `/api/convert`. -- Convert with no number such as `kg`: `GET` request to `/api/convert`. +- `10L` など、有効な入力を変換する: `/api/convert` への `GET` リクエスト +- `32g` など、無効な入力を変換する: `/api/convert` への`GET` リクエスト +- `3/7.2/4kg` など、無効な数値を変換する: `/api/convert` への `GET` リクエスト +- `3/7.2/4kilomegagram` など、数値も単位も無効な入力を変換する: `/api/convert` への `GET` リクエスト +- `kg` など、数値のない入力を変換する: `/api/convert` への `GET` リクエスト # --hints-- -You can provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出してください。 ```js getUserInput => { @@ -71,13 +71,13 @@ getUserInput => { }; ``` -You can `GET` `/api/convert` with a single parameter containing an accepted number and unit and have it converted. (Hint: Split the input by looking for the index of the first character which will mark the start of the unit) +受け取った数値と単位を含む 1 つのパラメーターを設定して `/api/convert` への `GET` を実行し、変換を実行することができます。 (ヒント: 単位の始まりを示す最初の文字のインデックスを探して、入力を分割してください) ```js ``` -You can convert `'gal'` to `'L'` and vice versa. (1 gal to 3.78541 L) +`'gal'` を `'L'` に変換できます。その逆も可能です。 (1 gal は 3.78541 L) ```js async getUserInput => { @@ -100,7 +100,7 @@ async getUserInput => { }; ``` -You can convert `'lbs'` to `'kg'` and vice versa. (1 lbs to 0.453592 kg) +`'lbs'` を `'kg'` に変換できます。その逆も可能です。 (1 lbs は 0.453592 kg) ```js async getUserInput => { @@ -123,7 +123,7 @@ async getUserInput => { }; ``` -You can convert `'mi'` to `'km'` and vice versa. (1 mi to 1.60934 km) +`'mi'` を `'km'` に変換できます。その逆も可能です。 (1 mi は 1.60934 km) ```js async getUserInput => { @@ -146,7 +146,7 @@ async getUserInput => { }; ``` -All incoming units should be accepted in both upper and lower case, but should be returned in both the `initUnit` and `returnUnit` in lower case, except for liter, which should be represented as an uppercase `'L'`. +すべての入力単位は大文字と小文字の両方で受け付けられるようにする必要がありますが、`initUnit` と `returnUnit` はどちらも小文字で返す必要があります。ただし、リットルのみは例外で、大文字の `'L'` で表示する必要があります。 ```js async getUserInput => { @@ -169,7 +169,7 @@ async getUserInput => { }; ``` -If the unit of measurement is invalid, returned will be `'invalid unit'`. +測定単位が無効の場合は、`'invalid unit'` を返します。 ```js async getUserInput => { @@ -182,7 +182,7 @@ async getUserInput => { }; ``` -If the number is invalid, returned will be `'invalid number'`. +数値が無効の場合は、`'invalid number'` を返します。 ```js async getUserInput => { @@ -197,7 +197,7 @@ async getUserInput => { }; ``` -If both the unit and number are invalid, returned will be `'invalid number and unit'`. +単位と数値の両方が無効な場合は、`'invalid number and unit'` を返します。 ```js async getUserInput => { @@ -215,7 +215,7 @@ async getUserInput => { }; ``` -You can use fractions, decimals or both in the parameter (ie. 5, 1/2, 2.5/6), but if nothing is provided it will default to 1. +パラメーターでは分数、小数または両方を使用できますが (5、1/2、2.5/6 など)、何も指定されていない場合はデフォルトで 1 になります。 ```js async getUserInput => { @@ -246,7 +246,7 @@ async getUserInput => { }; ``` -Your return will consist of the `initNum`, `initUnit`, `returnNum`, `returnUnit`, and `string` spelling out units in the format `'{initNum} {initUnitString} converts to {returnNum} {returnUnitString}'` with the result rounded to 5 decimals. +戻り値は、`initNum`、`initUnit`、`returnNum`、`returnUnit`、およびそれぞれの単位を `'{initNum} {initUnitString} converts to {returnNum} {returnUnitString}'` という形式 (結果は小数点 5 桁に丸める) で説明した `string` で構成されます。 ```js async getUserInput => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md index fe89eeceb60..4306f550da7 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/personal-library.md @@ -41,7 +41,7 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ }; ``` -You can send a POST request to `/api/books` with `title` as part of the form data to add a book. The returned response will be an object with the `title` and a unique `_id` as keys. If `title` is not included in the request, the returned response should be the string `missing required field title`. +フォームデータの一部として `title` を指定して `/api/books` へ POST リクエストを送信し、本を追加することができます。 返されるレスポンスは、`title` と一意の `_id` をキーとして持つオブジェクトになります。 `title` がリクエストに含まれていない場合、返されるレスポンスは文字列 `missing required field title` である必要があります。 ```js async (getUserInput) => { @@ -62,7 +62,7 @@ async (getUserInput) => { }; ``` -You can send a GET request to `/api/books` and receive a JSON response representing all the books. The JSON response will be an array of objects with each object (book) containing `title`, `_id`, and `commentcount` properties. +GET リクエストを `/api/books` へ送信し、すべての本を表す JSON レスポンスを受け取ることができます。 JSON レスポンスはオブジェクトの配列であり、それぞれのオブジェクト (book) に `title`、`_id` および `commentcount` プロパティが含まれます。 ```js async (getUserInput) => { @@ -90,7 +90,7 @@ async (getUserInput) => { }; ``` -You can send a GET request to `/api/books/{_id}` to retrieve a single object of a book containing the properties `title`, `_id`, and a `comments` array (empty array if no comments present). If no book is found, return the string `no book exists`. +GET リクエストを `/api/books/{_id}` へ送信して、プロパティ `title`、`_id` および `comments` 配列 (コメントがない場合は、空の配列) を含む book のオブジェクトを 1 つ取得できます。 本が見つからない場合は、文字列 `no book exists` を返してください。 ```js async (getUserInput) => { @@ -114,7 +114,7 @@ async (getUserInput) => { }; ``` -You can send a POST request containing `comment` as the form body data to `/api/books/{_id}` to add a comment to a book. The returned response will be the books object similar to GET `/api/books/{_id}` request in an earlier test. If `comment` is not included in the request, return the string `missing required field comment`. If no book is found, return the string `no book exists`. +`comment` をフォームデータ (ボディデータ) として含む POST リクエストを `/api/books/{_id}` へ送信し、本にコメントを追加することができます。 返されるレスポンスは、前述のテストの GET `/api/books/{_id}` リクエストと同様の book オブジェクトになります。 `comment` がリクエストに含まれていない場合は、文字列 `missing required field comment` を返してください。 本が見つからない場合、文字列 `no book exists` を返してください。 ```js async (getUserInput) => { @@ -152,7 +152,7 @@ async (getUserInput) => { }; ``` -You can send a DELETE request to `/api/books/{_id}` to delete a book from the collection. The returned response will be the string `delete successful` if successful. If no book is found, return the string `no book exists`. +DELETE リクエストを `/api/books/{_id}` へ送信して、コレクションから本を削除できます。 成功した場合、文字列 `delete successful` のレスポンスを返します。 本が見つからない場合は、文字列 `no book exists` を返してください。 ```js async (getUserInput) => { @@ -176,7 +176,7 @@ async (getUserInput) => { }; ``` -You can send a DELETE request to `/api/books` to delete all books in the database. The returned response will be the string `complete delete successful` if successful. +DELETE リクエストを `/api/books` へ送信して、データベース内のすべての本を削除することができます。 成功した場合、文字列 `complete delete successful` のレスポンスを返します。 ```js async (getUserInput) => { diff --git a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index 1dcfcafcc72..17bd06457f5 100644 --- a/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/japanese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -24,50 +24,50 @@ Replit を使用する場合は、下記の手順でプロジェクトをセッ # --instructions-- -- All puzzle logic can go into `/controllers/sudoku-solver.js` - - The `validate` function should take a given puzzle string and check it to see if it has 81 valid characters for the input. - - The `check` functions should be validating against the *current* state of the board. - - The `solve` function should handle solving any given valid puzzle string, not just the test inputs and solutions. You are expected to write out the logic to solve this. -- All routing logic can go into `/routes/api.js` -- See the `puzzle-strings.js` file in `/controllers` for some sample puzzles your application should solve -- To run the challenge tests on this page, set `NODE_ENV` to `test` without quotes in the `.env` file +- すべてのパズルロジックを `/controllers/sudoku-solver.js` に記述してください。 + - `validate` 関数は、与えられたパズル文字列を受け取り、入力に 81 の有効な文字があるか確認する必要があります。 + - 一連の `check` 関数は、ボードの*現在の*状態を確認する必要があります。 + - `solve` 関数は、テスト入力と解答だけでなく、与えられた任意の有効なパズル文字列を解く処理を行う必要があります。 パズルを解くためのロジックを記述することが求められます。 +- すべてのルーティングロジックを `/routes/api.js` に記述してください。 +- アプリで解くべきパズルのサンプルについては、`/controllers` の `puzzle-strings.js` ファイルを参照してください。 +- このページのテストを実行するには、`.env` ファイル内で `NODE_ENV` を `test` (引用符は付けない) に設定してください。 - コンソールでテストを実行するには、コマンド `npm run test` を使用してください。 Replit コンソールを開くには、Ctrl+Shift+P (Macの場合はCmd) を押して「open shell」と入力してください。 `tests/1_unit-tests.js` に以下のテストを記述してください。 -- Logic handles a valid puzzle string of 81 characters -- Logic handles a puzzle string with invalid characters (not 1-9 or `.`) -- Logic handles a puzzle string that is not 81 characters in length -- Logic handles a valid row placement -- Logic handles an invalid row placement -- Logic handles a valid column placement -- Logic handles an invalid column placement -- Logic handles a valid region (3x3 grid) placement -- Logic handles an invalid region (3x3 grid) placement -- Valid puzzle strings pass the solver -- Invalid puzzle strings fail the solver -- Solver returns the expected solution for an incomplete puzzle +- ロジックが、81 文字の有効なパズル文字列を処理する場合 +- ロジックが、(1~9 でも `.` でもない) 無効な文字が含まれているパズル文字列を処理する場合 +- ロジックが、長さが 81 文字ではないパズル文字列を処理する場合 +- ロジックが、有効な行の配置を処理する場合 +- ロジックが、無効な行の配置を処理する場合 +- ロジックが、有効な列の配置を処理する場合 +- ロジックが、無効な列の配置を処理する場合 +- ロジックが、有効な領域 (3x3 グリッド) の配置を処理する場合 +- ロジックが、無効な領域 (3x3 グリッド) の配置を処理する場合 +- 有効なパズルの文字列が、ソルバーをパスすること +- 無効なパズル文字列が、ソルバーをパスしないこと +- 不完全なパズルの場合に、ソルバーが期待される解答を返すこと -Write the following tests in `tests/2_functional-tests.js` +`tests/2_functional-tests.js` に以下のテストを記述してください。 -- Solve a puzzle with valid puzzle string: POST request to `/api/solve` -- Solve a puzzle with missing puzzle string: POST request to `/api/solve` -- Solve a puzzle with invalid characters: POST request to `/api/solve` -- Solve a puzzle with incorrect length: POST request to `/api/solve` -- Solve a puzzle that cannot be solved: POST request to `/api/solve` -- Check a puzzle placement with all fields: POST request to `/api/check` -- Check a puzzle placement with single placement conflict: POST request to `/api/check` -- Check a puzzle placement with multiple placement conflicts: POST request to `/api/check` -- Check a puzzle placement with all placement conflicts: POST request to `/api/check` -- Check a puzzle placement with missing required fields: POST request to `/api/check` -- Check a puzzle placement with invalid characters: POST request to `/api/check` -- Check a puzzle placement with incorrect length: POST request to `/api/check` -- Check a puzzle placement with invalid placement coordinate: POST request to `/api/check` -- Check a puzzle placement with invalid placement value: POST request to `/api/check` +- 有効なパズル文字列のパズルを解く: `/api/solve` への POST リクエスト +- パズル文字列が不足している状態でパズルを解く: `/api/solve` への POST リクエスト +- 無効な文字があるパズルを解く: `/api/solve` への POST リクエスト +- 誤った長さのパズルを解く: `/api/solve` への POST リクエスト +- 解くことができないパズルを解く: `/api/solve` への POST リクエスト +- すべてのフィールドがある状態でパズル配置をチェックする: `/api/check` への POST リクエスト +- 1 種類の配置の競合が発生しているパズル配置をチェックする: `/api/check` への POST リクエスト +- 複数種類の配置の競合が発生しているパズル配置をチェックする: `/api/check` への POST リクエスト +- 全種類の配置の競合が発生しているパズル配置をチェックする: `/api/check` への POST リクエスト +- 必須フィールドがない状態でパズル配置をチェックする: `/api/check`への POST リクエスト +- 無効な文字がある状態でパズル配置をチェックする: `/api/check` への POST リクエスト +- 長さに誤りがある状態でパズル配置をチェックする: `/api/check` への POST リクエスト +- 無効な配置座標を使用してパズル配置をチェックする: `/api/check` への POST リクエスト +- 無効な配置の値を使用してパズル配置をチェックする: `/api/check` への POST リクエスト # --hints-- -You should provide your own project, not the example URL. +サンプルの URL ではなく、自分で作成したプロジェクトを提出する必要があります。 ```js (getUserInput) => { @@ -76,7 +76,7 @@ You should provide your own project, not the example URL. }; ``` -You can `POST` `/api/solve` with form data containing `puzzle` which will be a string containing a combination of numbers (1-9) and periods `.` to represent empty spaces. The returned object will contain a `solution` property with the solved puzzle. +数字 (1~9) と空白を表すピリオド `.` の組み合わせを含む文字列である `puzzle` を含むフォームデータを使用して、`POST` `/api/solve` を実行することができます。 返されるオブジェクトには、パズルの解答を含む `solution` プロパティが含まれます。 ```js async (getUserInput) => { @@ -95,7 +95,7 @@ async (getUserInput) => { }; ``` -If the object submitted to `/api/solve` is missing `puzzle`, the returned value will be `{ error: 'Required field missing' }` +`/api/solve` へ送信されたオブジェクトに `puzzle` がない場合、戻り値は `{ error: 'Required field missing' }` になります。 ```js async (getUserInput) => { @@ -113,7 +113,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/solve` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }` +`/api/solve` へ送信されたパズルに数字でもピリオドでもない値が含まれている場合、戻り値は `{ error: 'Invalid characters in puzzle' }` になります。 ```js async (getUserInput) => { @@ -131,7 +131,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/solve` is greater or less than 81 characters, the returned value will be `{ error: 'Expected puzzle to be 81 characters long' }` +`/api/solve` へ送信されたパズルの文字数が 81 文字より多いまたは少ない場合、戻り値は `{ error: 'Expected puzzle to be 81 characters long' }` になります。 ```js async (getUserInput) => { @@ -153,7 +153,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/solve` is invalid or cannot be solved, the returned value will be `{ error: 'Puzzle cannot be solved' }` +`/api/solve` へ送信されたパズルが無効もしくは解けない場合、戻り値は `{ error: 'Puzzle cannot be solved' }` になります。 ```js async (getUserInput) => { @@ -171,7 +171,7 @@ async (getUserInput) => { }; ``` -You can `POST` to `/api/check` an object containing `puzzle`, `coordinate`, and `value` where the `coordinate` is the letter A-I indicating the row, followed by a number 1-9 indicating the column, and `value` is a number from 1-9. +`puzzle`、`coordinate` および `value` を含むオブジェクトを `/api/check` に `POST` できます。`coordinate` は行を示す文字 A~I で、その後に列を示す 1~9 の数字が続きます。`value` は 1~9 の数字です。 ```js async (getUserInput) => { @@ -190,7 +190,7 @@ async (getUserInput) => { }; ``` -The return value from the `POST` to `/api/check` will be an object containing a `valid` property, which is `true` if the number may be placed at the provided coordinate and `false` if the number may not. If false, the returned object will also contain a `conflict` property which is an array containing the strings `"row"`, `"column"`, and/or `"region"` depending on which makes the placement invalid. +`/api/check` への `POST` の戻り値は、`valid` プロパティを含むオブジェクトになります。このプロパティは、指定された座標に数字を配置できる場合は `true` になり、そうでない場合は `false` になります。 false の場合、返されるオブジェクトには `conflict` プロパティも含まれます。このプロパティは、文字列 `"row"`、`"column"`、`"region"` の任意の組み合わせを含む配列になります (どれが原因で配置が無効となっているかによって変わります)。 ```js async (getUserInput) => { @@ -213,7 +213,7 @@ async (getUserInput) => { }; ``` -If `value` submitted to `/api/check` is already placed in `puzzle` on that `coordinate`, the returned value will be an object containing a `valid` property with `true` if `value` is not conflicting. +`/api/check` へ送信された `value` がすでに `puzzle` のその `coordinate` に配置されている場合、戻り値は `valid` プロパティを含むオブジェクトになり、このプロパティの値は `value` が競合していなければ `true` となります。 ```js async (getUserInput) => { @@ -232,7 +232,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/check` contains values which are not numbers or periods, the returned value will be `{ error: 'Invalid characters in puzzle' }` +`/api/check` へ送信されたパズルに数字でもピリオドでもない値が含まれている場合、戻り値は `{ error: 'Invalid characters in puzzle' }` になります。 ```js async (getUserInput) => { @@ -252,7 +252,7 @@ async (getUserInput) => { }; ``` -If the puzzle submitted to `/api/check` is greater or less than 81 characters, the returned value will be `{ error: 'Expected puzzle to be 81 characters long' }` +`/api/check` へ送信されたパズルが 81 文字より多いか少ない場合、戻り値は `{ error: 'Expected puzzle to be 81 characters long' }` になります。 ```js async (getUserInput) => { @@ -276,7 +276,7 @@ async (getUserInput) => { }; ``` -If the object submitted to `/api/check` is missing `puzzle`, `coordinate` or `value`, the returned value will be `{ error: 'Required field(s) missing' }` +`/api/check` へ送信されたオブジェクトに `puzzle`、`coordinate` もしくは `value` がない場合、戻り値は、`{ error: 'Required field(s) missing' }` になります。 ```js async (getUserInput) => { @@ -308,7 +308,7 @@ async (getUserInput) => { }; ``` -If the coordinate submitted to `api/check` does not point to an existing grid cell, the returned value will be `{ error: 'Invalid coordinate'}` +`api/check` へ送信された座標が既存のグリッドセルを指し示していない場合、戻り値は `{ error: 'Invalid coordinate'}` になります。 ```js async (getUserInput) => { @@ -330,7 +330,7 @@ async (getUserInput) => { }; ``` -If the `value` submitted to `/api/check` is not a number between 1 and 9, the returned value will be `{ error: 'Invalid value' }` +`/api/check` へ送信された `value` が 1 から 9 の数字でない場合、戻り値は `{ error: 'Invalid value' }` になります。 ```js async (getUserInput) => { @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -12 件のユニットテストがすべて記述され、成功する状態になっています。 テストを記述すべき期待動作については、`/tests/1_unit-tests.js` を参照してください。 +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -14 件の機能テストがすべて記述され、成功する状態になっています。 テストを記述すべき期待される機能については、`/tests/2_functional-tests.js` を参照してください。 +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md index f1a623b23b3..f6526627ea5 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -Todos os 24 testes de unidade foram concluídos e deram aprovação. Veja `/tests/1_unit-tests.js` para o comportamento esperado para o qual você deve escrever os testes. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -Todos os 6 testes funcionais foram concluídos e deram aprovação. Veja `/tests/2_functional-tests.js` para o comportamento esperado para o qual você deve escrever os testes. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index f8e050923a0..e5b5c708c10 100644 --- a/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/portuguese/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -Todos os 12 testes de unidade foram concluídos e deram aprovação. Veja `/tests/1_unit-tests.js` para o comportamento esperado para o qual você deve escrever os testes. +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -Todos os 14 testes funcionais foram concluídos e deram aprovação. Veja `/tests/2_functional-tests.js` para a funcionalidade esperada para o qual você deve escrever os testes. +All 14 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md index ad0b747f17d..b8c833ce28e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/compare-scopes-of-the-var-and-let-keywords.md @@ -12,7 +12,7 @@ dashedName: compare-scopes-of-the-var-and-let-keywords Коли ви оголошуєте змінну з ключовим словом `var`, вона оголошена глобально, або локально, якщо оголошена всередині функції. -Ключове слово `let` поводиться схожим чином, але з додатковими можливостями. Коли ви оголошуєте змінну з ключовим словом `let` всередині блоку, інструкції чи виразу, її можливості обмежуються цим блоком, інструкцією чи виразом. +Ключове слово `let` поводиться схожим чином, але з додатковими можливостями. Коли ви оголошуєте змінну з ключовим словом `let` всередині блоку, інструкції чи виразу, її область видимості обмежується цим блоком, інструкцією чи виразом. Наприклад: @@ -27,7 +27,7 @@ console.log(i); У такому разі консоль показуватиме значення `[0, 1, 2]` та `3`. -Якщо ключовим словом є `var`, то `i` оголошується глобально. Тому коли виконується `i++`, глобальна змінна теж оновлюється. Цей код схожий до наступного: +Якщо ключовим словом є `var`, то `i` оголошується глобально. Тому коли виконується `i++`, оновлюється глобальна змінна. Цей код схожий до наступного: ```js var numArray = []; @@ -78,9 +78,9 @@ console.log(i); # --instructions-- -Виправте код так, щоб `i`, оголошена в інструкції `if`, була окремою змінною від `i`, оголошеною у першому рядку функції. Не використовуйте у вашому коді ключове слово `var`. +Виправте код так, щоб `i`, оголошена в інструкції `if`, була окремою змінною від `i`, оголошеною у першому рядку функції. Не використовуйте у своєму коді ключове слово `var`. -Ця вправа створена для того, щоб показати відмінність між тим, як ключові слова `var` і `let` присвоюють область видимості оголошеній змінній. При програмуванні схожої функції краще використовувати різні назви для змінних, щоб уникнути плутанини. +Це завдання створене для того, щоб показати відмінність між тим, як ключові слова `var` і `let` присвоюють область видимості оголошеній змінній. При програмуванні схожої функції краще використовувати різні назви для змінних, щоб уникнути плутанини. # --hints-- @@ -96,7 +96,7 @@ assert(!code.match(/var/g)); assert(code.match(/(i\s*=\s*).*\s*.*\s*.*\1('|")block\s*scope\2/g)); ``` -`checkScope()` повинна повертати рядок `function scope` +`checkScope()` має повертати рядок `function scope` ```js assert(checkScope() === 'function scope'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md index 1c2dda1ccb0..a7da184bf80 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/complete-a-promise-with-resolve-and-reject.md @@ -1,6 +1,6 @@ --- id: 5cdafbc32913098997531680 -title: Виконайте Promise за допомогою команд resolve та reject +title: Виконання промісу за допомогою resolve та reject challengeType: 1 forumTopicId: 301196 dashedName: complete-a-promise-with-resolve-and-reject @@ -8,7 +8,7 @@ dashedName: complete-a-promise-with-resolve-and-reject # --description-- -Promise має три стани: `pending`, `fulfilled` та `rejected`. Promise, який ви створили у попередньому завданні, буде завжди знаходитися у стані `pending`, оскільки ви не передбачили можливості завершити Promise. Для цього використовуються параметри `resolve` і `reject`, що належать аргументу Promise. `resolve` використовується для виконання Promise, а `reject` використовується для відхилення Promise. При таких методах з'являється аргумент, як показано нижче. +Проміс має три стани: `pending`, `fulfilled` та `rejected`. Проміс, який ви створили у попередньому завданні, завжди буде знаходитись у стані `pending`, оскільки ви не передбачили його завершення. Для цього використовуються параметри `resolve` та `reject`, які надаються аргументу. Використовуйте `resolve`, якщо ви хочете виконати проміс успішно та `reject`, якщо навпаки. Ці методи приймають аргумент, як показано нижче. ```js const myPromise = new Promise((resolve, reject) => { @@ -20,15 +20,15 @@ const myPromise = new Promise((resolve, reject) => { }); ``` -Попередній приклад використовує рядки для аргументу цих функцій, але можливі й інші варіанти. Часто це може також бути об'єкт, дані якого ви використаєте для розміщення на своєму сайті чи в іншому місці. +Вищеподаний приклад використовує рядки для аргументу цих функцій, але це може бути чим завгодно. Часто це може бути об’єкт, дані якого ви використаєте для розміщення на своєму сайті чи в іншому місці. # --instructions-- -Запрограмуйте Promise так, щоб він самостійно обробляв виконання або відхилення. Якщо `responseFromServer` виявляється `true`, викличте метод `resolve`, щоб успішно виконати Promise. Додайте до `resolve` рядок зі значенням `We got the data`. Якщо `responseFromServer` виявляється `false`, використайте метод `reject` і додайте рядок `Data not received`. +Запрограмуйте проміс так, щоб він міг обробити успіх та поразку. Якщо `responseFromServer` виявиться `true`, викличте метод `resolve`, щоб успішно виконати проміс. Додайте до `resolve` рядок зі значенням `We got the data`. Якщо `responseFromServer` виявиться `false`, використайте метод `reject` та передайте йому рядок `Data not received`. # --hints-- -`resolve` має викликатися за допомогою очікуваного рядка, а значення `if` має бути `true`. +`resolve` має викликатися за допомогою очікуваного рядка, коли умовою `if` є `true`. ```js assert( @@ -36,7 +36,7 @@ assert( ); ``` -`reject` має викликатися за допомогою очікуваного рядка, а значення `if` має бути `false`. +`reject` має викликатися за допомогою очікуваного рядка, коли умовою `if` є `false`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md index 70e86c42ec1..3e170282fc0 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-javascript-promise.md @@ -1,6 +1,6 @@ --- id: 5cdafbb0291309899753167f -title: Створіть Promise у JavaScript +title: Створення промісу в JavaScript challengeType: 1 forumTopicId: 301197 dashedName: create-a-javascript-promise @@ -8,7 +8,7 @@ dashedName: create-a-javascript-promise # --description-- -У JavaScript Promise (з англ. «обіцянка») має пряме значення: цей термін використовується для того, щоб «пообіцяти» щось зробити, зазвичай асинхронно. Коли завдання звершується, ви або виконуєте Promise, або відхиляєте його. `Promise` - це функція конструктора, тож необхідно використати ключове слово `new`, щоб створити новий Promise. Для цього потрібні функція, як його аргумент, з двома параметрами: `resolve` та `reject`. Такі методи використовуються для визначення результату Promise. Синтаксис виглядає наступним чином: +Проміс у JavaScript (з англ. «обіцянка») має пряме значення: цей термін використовується для того, щоб «пообіцяти» щось зробити, зазвичай асинхронно. Коли завдання звершується, ви або виконуєте проміс, або відхиляєте його. `Promise` є конструктурною функцією, тому потрібно використати ключове слово `new`, щоб створити новий проміс. Він приймає функцію як свій аргумент з двома параметрами: `resolve` та `reject`. Ці методи використовують, щоб визначити результат промісу. Синтаксис виглядає наступним чином: ```js const myPromise = new Promise((resolve, reject) => { @@ -18,17 +18,17 @@ const myPromise = new Promise((resolve, reject) => { # --instructions-- -Створіть новий Promise під назвою `makeServerRequest`. У функції перейдіть до параметрів конструктора `resolve` та `reject`. +Створіть новий проміс під назвою `makeServerRequest`. Передайте функцію з параметрами `resolve` та `reject` до конструктора. # --hints-- -Призначте Promise до оголошеної змінної під назвою `makeServerRequest`. +Ви повинні присвоїти проміс до оголошеної змінної під назвою `makeServerRequest`. ```js assert(makeServerRequest instanceof Promise); ``` -Ваш Promise має отримати функцію з параметрами `resolve` та `reject`. +Ваш проміс повинен отримати функцію з параметрами `resolve` та `reject`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md index 839a6254463..a5113f86483 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/create-a-module-script.md @@ -8,7 +8,7 @@ dashedName: create-a-module-script # --description-- -Спочатку мова JavaScript відігравала незначну роль на веб-сторінках HTML, створених по-іншому. Сьогодні вона має величезне значення. Деякі сайти навіть створюються майже повністю за допомогою JavaScript. Для того, щоб мова JavaScript була більш модульною, точною і зручною у користуванні, ES6 створив новий спосіб для доступної передачі коду між файлами JavaScript. Таким чином, ви можете експортувати частини файлу і використати їх в більше ніж одному іншому файлі, а також імпортувати потрібні вам уривки. Щоб скористатися таким функціоналом, необхідно створити скрипт у вашому HTML-документі з `module` `type`. Наприклад: +Спочатку мова JavaScript відігравала незначну роль на веб-сторінках HTML, створених по-іншому. Сьогодні вона має величезне значення. Деякі сайти навіть створюються майже повністю за допомогою JavaScript. Для того, щоб мова JavaScript була більш модульною, точною і зручною у користуванні, ES6 створив новий спосіб для доступної передачі коду між файлами JavaScript. Таким чином, ви можете експортувати частини файлу і використати їх в більше ніж одному іншому файлі, а також імпортувати потрібні вам уривки. Щоб скористатися таким функціоналом, необхідно створити скрипт у вашому HTML-документі з `module` `type`. Ось приклад: ```html diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/handle-a-fulfilled-promise-with-then.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/handle-a-fulfilled-promise-with-then.md index dd07f157e55..3a20fe86c0e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/handle-a-fulfilled-promise-with-then.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/es6/handle-a-fulfilled-promise-with-then.md @@ -8,7 +8,7 @@ dashedName: handle-a-fulfilled-promise-with-then # --description-- -Promises надзвичайно корисні, коли у вашому коді відбувається процес, що займає невизначений період часу (тобто асинхронний процес), наприклад, запит до сервера. Створення запиту до сервера займає певний час, а після його завершення, зазвичай, передбачаються подальші дії з відповіддю сервера. Цього можна досягти за допомогою методу `then`. Метод `then` виконується одразу після того, як ваш Promise входить у стан Fulfilled `resolve`. Наприклад: +Promises надзвичайно корисні, коли у вашому коді відбувається процес, що займає невизначений період часу (тобто асинхронний процес), наприклад, запит до сервера. Створення запиту до сервера займає певний час, а після його завершення, зазвичай, передбачаються подальші дії з відповіддю сервера. Цього можна досягти за допомогою методу `then`. Метод `then` виконується одразу після того, як ваш Promise входить у стан Fulfilled `resolve`. Ось приклад: ```js myPromise.then(result => { diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md index e73b6a16c25..85cabe5ad22 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/add-elements-to-the-end-of-an-array-using-concat-instead-of-push.md @@ -51,7 +51,7 @@ assert(JSON.stringify(first) === JSON.stringify([1, 2, 3])); assert(JSON.stringify(second) === JSON.stringify([4, 5])); ``` -`nonMutatingPush([1, 2, 3], [4, 5])` повинна повертати `[1, 2, 3, 4, 5]`. +`nonMutatingPush([1, 2, 3], [4, 5])` має повертати `[1, 2, 3, 4, 5]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md index 62f73f55c62..3fe0d2ec857 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/apply-functional-programming-to-convert-strings-to-url-slugs.md @@ -34,19 +34,19 @@ dashedName: apply-functional-programming-to-convert-strings-to-url-slugs assert(!code.match(/\.?[\s\S]*?replace/g)); ``` -`urlSlug("Winter Is Coming")` повинна повертати рядок `winter-is-coming`. +`urlSlug("Winter Is Coming")` має повертати рядок `winter-is-coming`. ```js assert(urlSlug('Winter Is Coming') === 'winter-is-coming'); ``` -`urlSlug(" Winter Is Coming")` повинна повертати рядок `winter-is-coming`. +`urlSlug(" Winter Is Coming")` має повертати рядок `winter-is-coming`. ```js assert(urlSlug(' Winter Is Coming') === 'winter-is-coming'); ``` -`urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone")` повинна повертати рядок `a-mind-needs-books-like-a-sword-needs-a-whetstone`. +`urlSlug("A Mind Needs Books Like A Sword Needs A Whetstone")` має повертати рядок `a-mind-needs-books-like-a-sword-needs-a-whetstone`. ```js assert( @@ -55,7 +55,7 @@ assert( ); ``` -`urlSlug("Hold The Door")` повинна повертати рядок `hold-the-door`. +`urlSlug("Hold The Door")` має повертати рядок `hold-the-door`. ```js assert(urlSlug('Hold The Door') === 'hold-the-door'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md index 1b4fdd4e2b9..9e0712a112e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-an-array-into-a-string-using-the-join-method.md @@ -20,7 +20,7 @@ const str = arr.join(" "); `str` матиме значення рядка `Hello World`. # --instructions-- -Використайте метод `join` (з-поміж інших) всередині функції `sentensify`, щоб створити речення зі слів у рядку `str`. Ваша функція повинна повертати рядок. Наприклад, `I-like-Star-Wars` буде перетворено в `I like Star Wars`. Не використовуйте метод `replace` у цьому завданні. +Використайте метод `join` (з-поміж інших) всередині функції `sentensify`, щоб створити речення зі слів у рядку `str`. Функція повинна повертати рядок. Наприклад, `I-like-Star-Wars` буде перетворено в `I like Star Wars`. Не використовуйте метод `replace` у цьому завданні. # --hints-- @@ -36,19 +36,19 @@ assert(code.match(/\.join/g)); assert(!code.match(/\.?[\s\S]*?replace/g)); ``` -`sentensify("May-the-force-be-with-you")` повинна повертати рядок. +`sentensify("May-the-force-be-with-you")` має повертати рядок. ```js assert(typeof sentensify('May-the-force-be-with-you') === 'string'); ``` -`sentensify("May-the-force-be-with-you")` повинна повертати рядок `May the force be with you`. +`sentensify("May-the-force-be-with-you")` має повертати рядок `May the force be with you`. ```js assert(sentensify('May-the-force-be-with-you') === 'May the force be with you'); ``` -`sentensify("The.force.is.strong.with.this.one")` повинна повертати рядок `The force is strong with this one`. +`sentensify("The.force.is.strong.with.this.one")` має повертати рядок `The force is strong with this one`. ```js assert( @@ -57,7 +57,7 @@ assert( ); ``` -`sentensify("There,has,been,an,awakening")` повинна повертати рядок `There has been an awakening`. +`sentensify("There,has,been,an,awakening")` має повертати рядок `There has been an awakening`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md index 220aa50c94c..f95ff13e915 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/combine-two-arrays-using-the-concat-method.md @@ -40,7 +40,7 @@ assert(JSON.stringify(first) === JSON.stringify([1, 2, 3])); assert(JSON.stringify(second) === JSON.stringify([4, 5])); ``` -`nonMutatingConcat([1, 2, 3], [4, 5])` повинна повертати `[1, 2, 3, 4, 5]`. +`nonMutatingConcat([1, 2, 3], [4, 5])` має повертати `[1, 2, 3, 4, 5]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md index 8dbc58467eb..be2d7eaabee 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-map-on-a-prototype.md @@ -20,7 +20,7 @@ dashedName: implement-map-on-a-prototype # --hints-- -`[23, 65, 98, 5, 13].myMap(item => item * 2)` повинна дорівнювати `[46, 130, 196, 10, 26]`. +`[23, 65, 98, 5, 13].myMap(item => item * 2)` має дорівнювати `[46, 130, 196, 10, 26]`. ```js const _test_s = [23, 65, 98, 5, 13]; @@ -28,7 +28,7 @@ const _callback = item => item * 2; assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` повинна повертати `["NAOMI", "QUINCY", "CAMPERBOT"]`. +`["naomi", "quincy", "camperbot"].myMap(element => element.toUpperCase())` має повертати `["NAOMI", "QUINCY", "CAMPERBOT"]`. ```js const _test_s = ["naomi", "quincy", "camperbot"]; @@ -36,7 +36,7 @@ const _callback = element => element.toUpperCase(); assert(JSON.stringify(_test_s.map(_callback)) === JSON.stringify(_test_s.myMap(_callback))); ``` -`[1, 1, 2, 5, 2].myMap((element, index, array) => array[index + 1] || array[0])` повинна повертати `[1, 2, 5, 2, 1]`. +`[1, 1, 2, 5, 2].myMap((element, index, array) => array[index + 1] || array[0])` має повертати `[1, 2, 5, 2, 1]`. ```js const _test_s = [1, 1, 2, 5, 2]; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md index 901b1752fee..7b9d903d6fc 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/implement-the-filter-method-on-a-prototype.md @@ -16,7 +16,7 @@ dashedName: implement-the-filter-method-on-a-prototype # --hints-- -`[23, 65, 98, 5, 13].myFilter(item => item % 2)` повинна дорівнювати `[23, 65, 5, 13]`. +`[23, 65, 98, 5, 13].myFilter(item => item % 2)` має дорівнювати `[23, 65, 5, 13]`. ```js const _test_s = [23, 65, 98, 5, 13]; @@ -24,7 +24,7 @@ const _callback = item => item % 2; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` повинна повертати `["naomi"]`. +`["naomi", "quincy", "camperbot"].myFilter(element => element === "naomi")` має повертати `["naomi"]`. ```js const _test_s = ["naomi", "quincy", "camperbot"]; @@ -32,7 +32,7 @@ const _callback = element => element === "naomi"; assert(JSON.stringify(_test_s.filter(_callback)) === JSON.stringify(_test_s.myFilter(_callback))); ``` -`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` повинна повертати `[1, 2, 5]`. +`[1, 1, 2, 5, 2].myFilter((element, index, array) => array.indexOf(element) === index)` має повертати `[1, 2, 5]`. ```js const _test_s = [1, 1, 2, 5, 2]; diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md index 54327d236e3..bce316f0a56 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/introduction-to-currying-and-partial-application.md @@ -8,9 +8,9 @@ dashedName: introduction-to-currying-and-partial-application # --description-- -Арність функції – це кількість необхідних аргументів. Каррування функції означає перетворення функції з арністю N на функції N з арністю 1. +Арність функції – це кількість необхідних аргументів. Каррінгом функції називають перетворення функції з n-ною арністю у n-ну кількість функцій з арністю 1. -Інакше кажучи, каррування реструктурує функцію так, що вона бере один аргумент, потім повертає іншу функцію, яка бере наступний аргумент, і так далі. +Іншими словами, структура функції змінюється так, що вона приймає один аргумент, потім повертається інша функція, яка приймає наступний аргумент і так далі. Ось приклад: @@ -32,14 +32,14 @@ curried(1)(2) `curried(1)(2)` поверне `3`. -Це знадобиться у вашій програмі, якщо ви не можете надати всі аргументи до функції одночасно. Ви можете зберегти кожен виклик функції в змінну, яка матиме посилання на повернуту функцію, що візьме наступний аргумент, коли він буде доступним. Ось приклад використання згаданої вище функції каррування: +Каррінг корисний для програми, якщо ви не можете надати всі аргументи до функції одночасно. Ви можете зберегти кожен виклик функції у змінній, що матиме посилання на повернуту функцію, яка прийме наступний аргумент (щойно він буде доступний). Ось приклад використання вищезгаданої функції каррінгу: ```js const funcForY = curried(1); console.log(funcForY(2)); // 3 ``` -Аналогічно часткове застосування можна описати як застосування декількох аргументів до функції одночасно і повернення іншої функції, яка застосовується до більшої кількості аргументів. Ось приклад: +Часткове застосування можна описати як застосування декількох аргументів до функції одночасно і повернення іншої функції, яка застосовується до більшої кількості аргументів. Ось приклад: ```js function impartial(x, y, z) { @@ -52,29 +52,29 @@ partialFn(10); // 13 # --instructions-- -Заповніть тіло функції `add` так, щоб використовувалось каррування для додавання параметрів `x`, `y` та `z`. +Заповніть тіло функції `add` так, щоб вона використовувала каррінг для додавання параметрів `x`, `y` та `z`. # --hints-- -`add(10)(20)(30)` потрібно повернути `60`. +`add(10)(20)(30)` має повертати `60`. ```js assert(add(10)(20)(30) === 60); ``` -`add(1)(2)(3)` потрібно повернути `6`. +`add(1)(2)(3)` має повертати `6`. ```js assert(add(1)(2)(3) === 6); ``` -`add(11)(22)(33)` потрібно повернути `66`. +`add(11)(22)(33)` має повертати `66`. ```js assert(add(11)(22)(33) === 66); ``` -Ваш код має містити остаточне твердження, яке повертає до `x + y + z`. +Ваш код повинен містити кінцеву інструкцію, яка повертає `x + y + z`. ```js assert(code.match(/[xyz]\s*?\+\s*?[xyz]\s*?\+\s*?[xyz]/g)); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md index ff493f5392c..12c6b1143d9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/pass-arguments-to-avoid-external-dependence-in-a-function.md @@ -1,6 +1,6 @@ --- id: 587d7b8e367417b2b2512b5f -title: Передавайте аргументи, щоб уникнути зовнішньої залежності у функції +title: Передача аргументів для уникнення зовнішньої залежності у функції challengeType: 1 forumTopicId: 301234 dashedName: pass-arguments-to-avoid-external-dependence-in-a-function @@ -8,23 +8,23 @@ dashedName: pass-arguments-to-avoid-external-dependence-in-a-function # --description-- -Остання задача полягала в тому, щоб на крок приблизитись до функціональних принципів програмування, однак все ще чогось не вистачає. +Попереднє завдання було на крок ближче до принципів функційного програмування, однак чогось досі не вистачає. -Ми не змінили значення глобальної змінної, але функція `incrementer` не буде працювати без глобальної змінної `fixedValue` being there. +Ми не змінили значення глобальної змінної, але функція `incrementer` не буде працювати без глобальної змінної `fixedValue`. -Інший принцип функціонального програмування - завжди відкрито заявляти про свої залежності. Це означає, що якщо функція залежить від змінної чи об'єкту, тоді ця змінна чи об'єкт передаються безпосередньо в функцію в якості аргументу. +Інший принцип функційного програмування – завжди оголошувати свої залежності відкрито. Це означає, що якщо функція залежить від змінної чи об’єкта, тоді ця змінна чи об’єкт передаються прямо до функції як аргумент. -Цей принцип має ряд хороших наслідків. Цю функцію легше перевірити, ви точно знаєте, який вхід потребується, і вона ні від чого не буде залежати у вашій програмі. +З цього принципу випливає декілька хороших наслідків. Цю функцію легше протестувати, ви знаєте її вхідні дані і вона ні від чого не залежить у вашій програмі. -Це може дати вам більше впевненості при зміні чи видаленні, чи додаванні нового коду. Ви б знали, що ви можете чи не можете змінити, і ви можете бачити, де розміщені потенційні пастки. +Таким чином ви будете впевненішими при зміні, видаленні чи додаванні нового коду. Ви знатимете, що можна змінити і бачитимете, де розміщені потенційні пастки. -Нарешті, функція завжди виробляє один і той же набір вхідних данних, незалежно від того, яка частина коду його виконує. +Зрештою, функція завжди виробляє однакові вихідні дані для однакових вхідних даних, незалежно від того, яка частина коду виконує їх. # --instructions-- -Давайте оновимо функцію `incrementer` для чіткого визначення залежностей. +Оновимо функцію `incrementer` так, щоб вона чітко оголошувала свої залежності. -Напишіть функцію `incrementer` так, щоб вона прийняла аргумент, а потім повертала результат після збільшення значення на одиницю. +Напишіть функцію `incrementer` так, щоб вона приймала аргумент, а потім повертала значення, збільшене на один. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md index b14cc9087a9..174ada67969 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/refactor-global-variables-out-of-functions.md @@ -1,6 +1,6 @@ --- id: 587d7b8f367417b2b2512b60 -title: Зміна глобальних змінних поза функціями +title: Рефакторинг глобальних змінних поза функціями challengeType: 1 forumTopicId: 301235 dashedName: refactor-global-variables-out-of-functions @@ -8,23 +8,23 @@ dashedName: refactor-global-variables-out-of-functions # --description-- -На сьогодні ми спостерігаємо два окремих принципи функціонального програмування: +Наразі ми розглянули два окремих принципи функційного програмування: -1) Не змінюйте змінну чи об'єкт - створюйте нові змінні і об'єкти та повертайте їх через функцію, якщо це необхідно. Підказка: використання чогось на зразок `const newArr = arrVar` (де `arrVar` є масивом) просто створить посилання на оригінальну змінну, а не копію. Таким чином, зміна значення в `newArr` змінить значення в `arrVar`. +1) Не змінюйте змінну чи об’єкт – створюйте нові змінні та об’єкти і, якщо потрібно, повертайте їх з функції. Підказка: якщо використати щось схоже до `const newArr = arrVar` (де `arrVar` є масивом), ви просто створите посилання на наявну змінну, а не копію. Тому, змінивши значення в `newArr`, зміниться значення в `arrVar`. -2) Оголошення параметрів функції - будь-яке обчислення всередині функції залежить лише від аргументів, переданих функції, а не від будь-якого глобального об'єкту чи змінної. +2) Оголошення параметрів функції – будь-яке обчислення всередині функції залежить лише від аргументів, переданих до функції, а не від глобального об’єкта чи змінної. -Додавання такого числа не є дуже захопливим, але ми можемо застосувати ці принципи при роботі з масивами або більш складними об'єктами. +Додавання одиниці до числа не дуже цікаве, але ми можемо застосувати ці принципи при роботі з масивами або складнішими об’єктами. # --instructions-- -Перепишіть код так, щоб глобальний масив `bookList` не змінювався всередині кожної функції. Функція `add` повинна додати цей код `bookName` в кінець масиву та повернути новий масив ( список). Функція `remove` повинна видалити вказану `bookName` з масиву, переданого до неї. +Перепишіть код так, щоб глобальний масив `bookList` не змінювався всередині жодної з функцій. Функція `add` повинна додати наданий `bookName` в кінець переданого масиву та повернути новий масив (список). Функція `remove` повинна видалити наданий `bookName` з переданого масиву. -**Note:** Обидві функції повинні повертати масив, і будь-які нові параметри повинні бути додані перед параметром `bookName`. +**Примітка:** обидві функції повинні повертати масив, і будь-які нові параметри повинні бути додані перед параметром `bookName`. # --hints-- -`bookList` не повинен змінюватися і, як і раніше, дорівнювати `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`. +`bookList` не повинен змінюватись та досі повинен дорівнювати `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`. ```js add(bookList, "Test"); @@ -40,7 +40,7 @@ assert( ); ``` -`add(bookList, "A Brief History of Time")` повинна повертати `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`. +`add(bookList, "A Brief History of Time")` має повертати `["The Hound of the Baskervilles", "On The Electrodynamics of Moving Bodies", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`. ```js assert( @@ -55,7 +55,7 @@ assert( ); ``` -`remove(bookList, "On The Electrodynamics of Moving Bodies")` повинна повертати `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`. +`remove(bookList, "On The Electrodynamics of Moving Bodies")` має повертати `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae"]`. ```js assert( @@ -68,7 +68,7 @@ assert( ); ``` -`remove(add(bookList, "A Brief History of Time"), "On The Electrodynamics of Moving Bodies");` повинен дорівнювати `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`. +`remove(add(bookList, "A Brief History of Time"), "On The Electrodynamics of Moving Bodies");` має дорівнювати `["The Hound of the Baskervilles", "Philosophiæ Naturalis Principia Mathematica", "Disquisitiones Arithmeticae", "A Brief History of Time"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md index 0d4cba96b59..49fe05c5394 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/remove-elements-from-an-array-using-slice-instead-of-splice.md @@ -1,6 +1,6 @@ --- id: 9d7123c8c441eeafaeb5bdef -title: Видалення елементів з масиву з використанням slice замість splice +title: Видалення елементів з масиву за допомогою slice замість splice challengeType: 1 forumTopicId: 301236 dashedName: remove-elements-from-an-array-using-slice-instead-of-splice @@ -8,22 +8,22 @@ dashedName: remove-elements-from-an-array-using-slice-instead-of-splice # --description-- -Загальним шаблоном під час роботи з масивами є те, коли ви хочете видалити елементи й зберегти решту масиву. JavaScript пропонує для цього метод « `splice`», який приймає аргументи для індексу, де саме починати видаляти елементи, а тоді — їх кількість. Якщо другий аргумент не було надано, то, за замовчуванням, елементи видаляються до кінця. Щоправда, метод «`splice`» змінює оригінальний масив, у якому викликається. Ось приклад: +Часто при роботі з масивами потрібно видалити деякі елементи, а решту масиву зберегти. JavaScript пропонує метод `splice`, який приймає аргументи для індексу (де саме почати видаляти елементи), а тоді – їх кількість. Якщо другий аргумент не надано, то елементи видаляються до кінця за замовчуванням. Однак метод `splice` змінює вихідний масив, у якому викликається. Ось приклад: ```js const cities = ["Chicago", "Delhi", "Islamabad", "London", "Berlin"]; cities.splice(3, 1); ``` -Тут `splice` повертає рядок `London` і видаляє його із масиву міст. `cities` матимуть значення `["Chicago", "Delhi", "Islamabad", "Berlin"]`. +Тут `splice` повертає рядок `London` і видаляє його із масиву міст. `cities` матиме значення `["Chicago", "Delhi", "Islamabad", "Berlin"]`. -Як ми могли бачити у останньому завдання, метод «`slice`» не змінює вихідного масиву, але повертає новий, який може бути збережений як змінний. Пригадайте, що метод «`slice`» використовує два аргументи для того, щоб індекси почали та закінчили slice (кінець не включається); і повертає ці елементи у новий масив. Використання методу «`slice`» замість «`splice`» допомагає уникнути будь-яких побічних дій зміни масиву. +Як ми бачили у попередньому завданні, метод `slice` не змінює вихідний масив, а повертає новий, який можна зберегти як змінну. Пригадайте, що метод `slice` використовує два аргументи для того, щоб почати і закінчити слайс (кінець не включається) та повертає ці елементи у новому масиві. Використання методу `slice` замість `splice` допомагає уникнути будь-яких побічних дій. # --instructions-- -Перепишіть функцію `nonMutatingSplice`, використовуючи `slice` замість `splice`. Він мусить обмежити наданий масив `cities` до довжини 3, і повернути новий масив лише із першими трьома елементами. +Перепишіть функцію `nonMutatingSplice`, використовуючи `slice` замість `splice`. Він повинен обмежити наданий масив `cities` до довжини 3, і повернути новий масив лише із першими трьома елементами. -Не змінюйте вихідний масив, наданий функцією. +Не змінюйте вихідний масив, наданий до функції. # --hints-- @@ -48,7 +48,7 @@ assert( ); ``` -`nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` повинна повертати `["Chicago", "Delhi", "Islamabad"]`. +`nonMutatingSplice(["Chicago", "Delhi", "Islamabad", "London", "Berlin"])` має повертати `["Chicago", "Delhi", "Islamabad"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md index cf3e2a85c22..c58092a93ca 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array.md @@ -8,11 +8,11 @@ dashedName: return-a-sorted-array-without-changing-the-original-array # --description-- -Побічним ефектом методу «`sort`» є те, що він змінює порядок елементів у вихідному масиві. Іншими словами, він змінює масив. Одним із способів уникнення цього є, по-перше, об'єднати пустий масив із тим, що вже є відсортованим (пам'ятайте, що `slice` та `concat` повертають новий масив), а тоді запустити метод «`sort`». +Побічним ефектом методу `sort` є те, що він змінює порядок елементів у вихідному масиві. Іншими словами, він змінює масив. Один зі способів уникнути цього – спочатку об’єднати порожній масив із масивом, який потрібно відсортувати (пам’ятайте, що `slice` та `concat` повертають новий масив), а потім запустити метод `sort`. # --instructions-- -Використовуйте метод `sort` у функції `nonMutatingSort`, щоб відсортувати елементи масиву у висхідному порядку. Функція повинна повернути новий масив і не змінювати змінну `globalArray`. +Використайте метод `sort` у функції `nonMutatingSort`, щоб відсортувати елементи масиву у висхідному порядку. Функція повинна повернути новий масив і не змінювати змінну `globalArray`. # --hints-- @@ -28,7 +28,7 @@ assert(nonMutatingSort.toString().match(/\.sort/g)); assert(JSON.stringify(globalArray) === JSON.stringify([5, 6, 3, 2, 9])); ``` -`nonMutatingSort(globalArray)` повинен повертати `[2, 3, 5, 6, 9]`. +`nonMutatingSort(globalArray)` має повертати `[2, 3, 5, 6, 9]`. ```js assert( @@ -37,26 +37,26 @@ assert( ); ``` -`nonMutatingSort(globalArray)` не мусить бути складно закодованим. +Не закодовуйте `nonMutatingSort(globalArray)` складно. ```js assert(!nonMutatingSort.toString().match(/\[.*?[23569].*?\]/gs)); ``` -Функція повинна повертатися як новий масив, а не масив передаватись через неї. +Функція повинна повертати новий масив, а не переданий масив. ```js assert(nonMutatingSort(globalArray) !== globalArray); ``` -`nonMutatingSort([1, 30, 4, 21, 100000])` повинен повертатися як `[1, 4, 21, 30, 100000]`. +`nonMutatingSort([1, 30, 4, 21, 100000])` має повертати `[1, 4, 21, 30, 100000]`. ```js assert(JSON.stringify(nonMutatingSort([1, 30, 4, 21, 100000])) === JSON.stringify([1, 4, 21, 30, 100000])) ``` -`nonMutatingSort([140000, 104, 99])` повинен повертатися як `[99, 104, 140000]`. +`nonMutatingSort([140000, 104, 99])` має повертати `[99, 104, 140000]`. ```js assert(JSON.stringify(nonMutatingSort([140000, 104, 99])) === diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md index cbf0bdaca55..15cdb9422c6 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/return-part-of-an-array-using-the-slice-method.md @@ -1,6 +1,6 @@ --- id: 587d7b90367417b2b2512b65 -title: Повернення частини масиву з використанням методу slice +title: Повернення частини масиву за допомогою методу slice challengeType: 1 forumTopicId: 301239 dashedName: return-part-of-an-array-using-the-slice-method @@ -8,7 +8,7 @@ dashedName: return-part-of-an-array-using-the-slice-method # --description-- -Метод «`slice`» повертає копію певних елементів масиву. Він використовує два аргументи: перший бере індекс, де починається slice, і другий — це індекс, де slice закінчується (не включно). Якщо аргументи не надані, то за замовчуванням - почати з початку масиву і дійти до кінця, що є не найлегшим способом скопіювати весь масив. Метод «`slice`» не змінює вихідний масив, але повертає новий. +Метод `slice` повертає копію певних елементів масиву. Він може приймати два аргументи: перший надає індекс, де починається слайс, а другий є індексом, де слайс закінчується (не включно). Якщо аргументи не надані, то початок і кінець відповідають початкові і кінцеві масиву, що є найлегшим способом створити копію масиву. Метод `slice` не змінює вихідний масив, а повертає новий. Ось приклад: @@ -21,7 +21,7 @@ const newArray = arr.slice(1, 3); # --instructions-- -Використовуйте метод «`slice`» у функції `sliceArray` для того, щоб повернути частину масиву `anim`, що обумовлений наданими індексами `beginSlice` та `endSlice`. Функція повинна повертати масив. +Використайте метод `slice` у функції `sliceArray`, щоб повернути частину масиву `anim`, врахувавши надані індекси `beginSlice` та `endSlice`. Функція повинна повертати масив. # --hints-- @@ -40,7 +40,7 @@ assert( ); ``` -`sliceArray(["Cat", "Dog", "Tiger", "Zebra", "Ant"], 1, 3)` повинен повертатися як `["Dog", "Tiger"]`. +`sliceArray(["Cat", "Dog", "Tiger", "Zebra", "Ant"], 1, 3)` має повертати `["Dog", "Tiger"]`. ```js assert( @@ -49,7 +49,7 @@ assert( ); ``` -`sliceArray(["Cat", "Dog", "Tiger", "Zebra", "Ant"], 0, 1)` повинен повертатися як `["Cat"]`. +`sliceArray(["Cat", "Dog", "Tiger", "Zebra", "Ant"], 0, 1)` має повертати `["Cat"]`. ```js assert( @@ -58,7 +58,7 @@ assert( ); ``` -`sliceArray(["Cat", "Dog", "Tiger", "Zebra", "Ant"], 1, 4)` повинен повертатися як `["Dog", "Tiger", "Zebra"]`. +`sliceArray(["Cat", "Dog", "Tiger", "Zebra", "Ant"], 1, 4)` має повертати `["Dog", "Tiger", "Zebra"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md index 616af83afce..80d4fd5332e 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/sort-an-array-alphabetically-using-the-sort-method.md @@ -1,6 +1,6 @@ --- id: 587d7da9367417b2b2512b69 -title: Сортування масиву в алфавітному порядку за допомогою сортувального методу +title: Сортування масиву в алфавітному порядку за допомогою методу sort challengeType: 1 forumTopicId: 18303 dashedName: sort-an-array-alphabetically-using-the-sort-method @@ -8,7 +8,7 @@ dashedName: sort-an-array-alphabetically-using-the-sort-method # --description-- -Метод `sort` сортує елементи масиву відповідно до функції зворотного зв'язку. +Метод `sort` сортує елементи масиву відповідно до функції зворотного виклику. Наприклад: @@ -22,7 +22,7 @@ function ascendingOrder(arr) { ascendingOrder([1, 5, 2, 3, 4]); ``` -Це б повернуло значення `[1, 2, 3, 4, 5]`. +Поверненим значенням буде `[1, 2, 3, 4, 5]`. ```js function reverseAlpha(arr) { @@ -34,13 +34,13 @@ function reverseAlpha(arr) { reverseAlpha(['l', 'h', 'z', 'b', 's']); ``` -Це б повернуло значення `['z', 's', 'l', 'h', 'b']`. +Поверненим значенням буде `['z', 's', 'l', 'h', 'b']`. -Типовий метод сортування JavaScript полягає в сортуванні рядкових точок Unicode, що може видавати неочікувані результати. Таким чином, це заохотить виклик функції зворотнього зв'язку, що визначить порядок сортування об'єктів масиву. Коли подана така функція зворотного зв'язку, яка зазвичай називається `compareFunction`, то елементи масиву відсортовуються відповідно до зворотнього значення `compareFunction`: Якщо `compareFunction(a,b)` видає значення менше за 0 для двох елементів `a` і `b`, тоді `a` переміститься перед `b`. Якщо `compareFunction(a,b)` видає значення більше 0 для двох елементів `a` і `b`, тоді `b` переміститься перед `a`. Якщо `compareFunction(a,b)` видає значення рівне 0 для двох елементів `a` і `b`, то `a` і `b` залишаться без змін. +Метод сортування JavaScript за замовчуванням – це значення Unicode, що може надати несподівані результати. Тому краще надавати функцію зворотного виклику, щоб визначити порядок сортування об’єктів масиву. Коли надається така функція зворотного виклику (зазвичай називається `compareFunction`), елементи масиву впорядковуються відповідно до її поверненого значення. Якщо `compareFunction(a,b)` повертає значення двох елементів (`a` та `b`) менше за 0, то `a` йтиме перед `b`. Якщо `compareFunction(a,b)` повертає значення двох елементів (`a` та `b`) більше за 0, то `b` йтиме перед `a`. Якщо `compareFunction(a,b)` повертає значення двох елементів (`a` та `b`) рівне 0, то `a` та `b` залишаться без змін. # --instructions-- -Використовуйте метод `sort` у функції `alphabeticalOrder`, щоб відсортувати елементи `arr` в алфавітному порядку. Функція має повернути впорядкований масив. +Використайте метод `sort` у функції `alphabeticalOrder`, щоб відсортувати елементи в `arr` за алфавітним порядком. Функція повинна повертати відсортований масив. # --hints-- @@ -50,7 +50,7 @@ reverseAlpha(['l', 'h', 'z', 'b', 's']); assert(code.match(/\.sort/g)); ``` -`alphabeticalOrder(["a", "d", "c", "a", "z", "g"])` має видати `["a", "a", "c", "d", "g", "z"]`. +`alphabeticalOrder(["a", "d", "c", "a", "z", "g"])` має повертати `["a", "a", "c", "d", "g", "z"]`. ```js assert( @@ -59,7 +59,7 @@ assert( ); ``` -`alphabeticalOrder(["x", "h", "a", "m", "n", "m"])` має видати `["a", "h", "m", "m", "n", "x"]`. +`alphabeticalOrder(["x", "h", "a", "m", "n", "m"])` має повертати `["a", "h", "m", "m", "n", "x"]`. ```js assert( @@ -68,7 +68,7 @@ assert( ); ``` -`alphabeticalOrder(["a", "a", "a", "a", "x", "t"])` має видати `["a", "a", "a", "a", "t", "x"]`. +`alphabeticalOrder(["a", "a", "a", "a", "x", "t"])` має повертати `["a", "a", "a", "a", "t", "x"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.md index bb5d897fc4a..40025768e1c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/split-a-string-into-an-array-using-the-split-method.md @@ -1,6 +1,6 @@ --- id: 587d7daa367417b2b2512b6b -title: Розділіть рядок на масив використовуючи метод split +title: Розділення рядка на масив за допомогою методу split challengeType: 1 forumTopicId: 18305 dashedName: split-a-string-into-an-array-using-the-split-method @@ -8,9 +8,9 @@ dashedName: split-a-string-into-an-array-using-the-split-method # --description-- -Метод `split` розділяє рядок на сукупність рядів. Для розділювача потрібен аргумент, який може бути символом для розбиття рядка або регулярного виразу. Наприклад, якщо роздільник це простір, ви отримаєте масив слів, і якщо роздільник є пустим рядком, ви отримаєте масив кожного символа у рядку. +Метод `split` розділяє рядок на масив рядків. Він приймає потрібний аргумент для розділювача, який може бути символом для розбиття рядка чи регулярного виразу. Наприклад, якщо розділювач є пробілом, ви отримаєте масив слів, а якщо розділювачем є пустий рядок, ви отримаєте масив окремих рядків із символом. -Ось два приклади, які розділяють один рядок на пробіли, а потім інші на цифри, використовуючи регулярний вираз: +Ось два приклади, які розділяють один рядок пробілами, а інший – цифрами, використовуючи регулярний вираз: ```js const str = "Hello World"; @@ -20,13 +20,13 @@ const otherString = "How9are7you2today"; const byDigits = otherString.split(/\d/); ``` -`bySpace` матиме значення `["Hello", "World"]` і `byDigits` матиме значення `["How", "are", "you", "today"]`. +`bySpace` матиме значення `["Hello", "World"]`, а `byDigits` матиме значення `["How", "are", "you", "today"]`. Оскільки рядки незмінні, метод `split` полегшує роботу з ними. # --instructions-- -Використовуйте метод `split` усередині функції `splitify`, щоб розділити `str` на масив слів. Функція повинна повертати масив слів. Звернімо увагу, що слова не завжди розділені пробілами, а масив не повинен містити знаки пунктуації. +Використайте метод `split` всередині функції `splitify`, щоб розділити `str` на масив слів. Функція повинна повертати масив. Зверніть увагу, що слова не завжди розділені пробілами і масив не повинен містити знаки пунктуації. # --hints-- @@ -36,7 +36,7 @@ const byDigits = otherString.split(/\d/); assert(code.match(/\.split/g)); ``` -`splitify("Hello World, I-am code")` має повертати . +`splitify("Hello World,I-am code")` має повертати `["Hello", "World", "I", "am", "code"]`. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-functional-programming-terminology.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-functional-programming-terminology.md index f12a89e9970..409ff7a093c 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-functional-programming-terminology.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-functional-programming-terminology.md @@ -1,6 +1,6 @@ --- id: 587d7b8e367417b2b2512b5c -title: Розуміння термінології функціонального програмування +title: Термінологія функційного програмування challengeType: 1 forumTopicId: 301240 dashedName: understand-functional-programming-terminology @@ -8,35 +8,35 @@ dashedName: understand-functional-programming-terminology # --description-- -Команда FCC мала поганий настрій і зараз хоче два види чаю: зелений і чорний. Загальновідомий факт: перепади настрою клієнта - це дуже поширене явище. +У команди fCC змінився настрій і тепер вони хочуть два типи чаю: зелений та чорний. Загальновідомий факт: перепади настрою клієнта є надзвичайно поширеним явищем. -Володіючи такою інформацією, нам потрібно буде повторно ввести функцію `getTea` від останнього завдання для обробки різних чайних запитів. Ми можемо змінити `getTea`, щоб прийняти функцію як параметр для того, щоб мати можливість змінювати вид чаю, який готується. Це робить `getTea` більш гнучким, і надає програмісту більше контролю, коли клієнт просить щось змінити. +З цією інформацією нам потрібно знову відвідати функцію `getTea`, щоб обробити різні чайні запити. Ми можемо змінити `getTea`, щоб прийняти функцію як аргумент і вона могла заварювати інші види чаю. Це робить `getTea` гнучкішою і надає програмісту більше контролю, якщо клієнт просить щось змінити. -Та спершу, давайте розглянемо трохи функціональної термінології: +Але спочатку розглянемо трішки функційної термінології: -Callbacks - функції, які висуваються або передаються в іншу функцію, щоб з'ясувати посилання на цю функцію. Можливо, ви вже бачили як вони переходили до інших методів, наприклад в `filter`, функція зворотного виклику повідомляє для JavaScript критерії для фільтрування структурних даних. +Функція зворотного виклику (callback) – це функції, які передаються іншим функціям, щоб вирішити, коли та як їх викликати. Можливо, ви бачили, як деякі передаються іншим методам. Наприклад, у `filter` функція зворотного виклику повідомляє JavaScript критерії для фільтрації масиву. -Функції, що призначені для змінної, передані в іншу функцію, або навпаки повернені від іншої функції, так само як інше звичайне значення, називається функції first class. У JavaScript, всі функції - це функції першого класу. +Функції, які можна присвоїти до змінної, передати до іншої функції або навпаки повернути з іншої функції, як інше звичайне значення, називають функціями першого класу. У JavaScript всі функції є функціями першого класу. -The functions that take a function as an argument, or return a function as a return value, are called higher order functions. +Функції, які приймають функцію як аргумент або повертають функцію як повернуте значення, називають функціями вищого порядку. -Коли функції передаються або повертаються від іншої функції, тоді ті функції, які були передані або повернені, можуть називатися lambda. +Якщо функції передаються або повертаються з іншої функції, тоді ті функції, які були передані або повернені, можуть називатися лямбдою. # --instructions-- -Приготуйте 27 чашок зеленого і 13 чашок чорного чаю і зберігайте їх відповідно у `tea4GreenTeamFCC` та `tea4BlackTeamFCC`. Зазначте, що функція `getTea` була змінена, тому тепер вона приймає функцію як перший аргумент. +Приготуйте 27 чашок зеленого і 13 чашок чорного чаю та збережіть їх у змінних `tea4GreenTeamFCC` та `tea4BlackTeamFCC`. Зверніть увагу, що функція `getTea` була змінена, тому тепер вона приймає функцію як перший аргумент. -Примітка: дані (кількість чашок чаю) надаються як останній аргумент. Ми поговоримо про це більше на подальших заняттях. +Примітка: дані (кількість чашок чаю) надаються як останній аргумент. Ми обговоримо це в наступних завданнях. # --hints-- -Змінна `tea4GreenTeamFCC` повинна мати 27 чашок зеленого чаю для команди. +Змінна `tea4GreenTeamFCC` повинна містити 27 чашок зеленого чаю для команди. ```js assert(tea4GreenTeamFCC.length === 27); ``` -Змінна `tea4GreenTeamFCC` повинна мати чашки зеленого чаю. +Змінна `tea4GreenTeamFCC` повинна містити чашки зеленого чаю. ```js assert(tea4GreenTeamFCC[0] === 'greenTea'); @@ -48,7 +48,7 @@ assert(tea4GreenTeamFCC[0] === 'greenTea'); assert(tea4BlackTeamFCC.length === 13); ``` -Змінна `tea4BlackTeamFCC` повинна містити чашки з чорним чаєм. +Змінна `tea4BlackTeamFCC` повинна містити чашки чорного чаю. ```js assert(tea4BlackTeamFCC[0] === 'blackTea'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md index 7d6aa8f9701..0d1659319be 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/understand-the-hazards-of-using-imperative-code.md @@ -1,6 +1,6 @@ --- id: 587d7b8e367417b2b2512b5d -title: Ризики використання Imperative Code +title: Ризики використання імперативного коду challengeType: 1 forumTopicId: 301241 dashedName: understand-the-hazards-of-using-imperative-code @@ -8,31 +8,31 @@ dashedName: understand-the-hazards-of-using-imperative-code # --description-- -Функціональне програмування - хороша звичка. Це дозволяє вам легко керувати своїм кодом та рятує від підступних помилок. Але перед тим, як перейти до цього, варто розібрати імперативний метод програмування, щоб підкреслити моменти, з якими у вас можуть виникнути проблеми. +Функційне програмування – хороша навичка. Воно дозволяє легко керувати кодом та рятує від підступних помилок. Але перед тим, як перейти до цього, варто розібрати імперативний метод програмування, щоб підкреслити моменти, з якими у вас можуть виникнути проблеми. -В англійській (та багатьох інших мовах) імператив використовується для надання команд. Так само у програмуванні імперативний стиль - це той, який надає комп'ютеру набір інструкцій, щоб виконати завдання. +В англійській мові (та багатьох інших) імператив використовується для надання команд. Аналогічно, імперативний стиль у програмуванні – це стиль, який надає комп’ютеру набір інструкцій, щоб виконати завдання. -Часто інструкції змінюють статус програми, як, наприклад, оновлення глобальних змінних. Типовий приклад - написання циклу `for`, який дає точні вказівки для ітерації по індексам масиву. +Інструкції часто змінюють стан програми, як, наприклад, оновлення глобальних змінних. Типовий приклад – написання циклу `for`, який дає точні вказівки для ітерації над індексами масиву. -У той же час функціональне програмування - це форма декларативного програмування. Ви вказуєте комп'ютеру, що потрібно зробити, викликаючи метод чи функцію. +Функційне програмування, навпаки, є формою декларативного програмування. Ви вказуєте комп’ютеру, що потрібно зробити, викликаючи метод чи функцію. -JavaScript пропонує багато попередньо визначених методів, які оброблюють загальні завдання. Тому вам не потрібно прописувати, як комп'ютер має виконати їх. Наприклад, замість використання циклу `for` згаданого вище, ви можете викликати метод `map`, який оброблює деталі ітерації по індексам масиву. Це допомагає уникнути смислових помилок, таких як, наприклад, "Помилка неврахованої одиниці", про які йшлося в розділі "Debugging". +JavaScript пропонує багато попередньо визначених методів, які обробляють типові завдання. Тому вам не потрібно прописувати, як комп’ютер повинен виконувати їх. Наприклад, замість використання вищезгаданого циклу `for`, ви можете викликати метод `map`, який обробляє деталі ітерації над індексами масиву. Це допомагає уникнути семантичних помилок, як-от «Помилки неврахованої одиниці», про які йшлося в розділі налагодження. -Розглянемо ситуацію: ви переглядаєте веб-сторінки і хочете відслідковувати відкриті вкладки. Змоделюємо це, використовуючи звичайний об'єктно-орієнтований код. +Уявимо ситуацію: ви переглядаєте вебсторінки і хочете відслідковувати відкриті вкладки. Змоделюємо це, використавши звичайний об’єктноорієнтований код. -Об'єкт Window складається з вкладок і, як правило, їх відкрито декілька. Назви кожного відкритого сайту в кожному об'єкті Window зберігаються в масиві. Після роботи в браузері (відкриття та закриття вкладок, об'єднанні вікон) ви хочете роздрукувати вкладки, які все ще відкриті. Закриті вкладки видаляються з масиву, а нові (для спрощення) додаються в кінець. +Об’єкт-вікно складається з вкладок і, як правило, їх відкрито декілька. Назви кожного відкритого сайту в кожному об’єкті-вікні зберігаються у масиві. Після роботи в браузері (відкриття та закриття вкладок, об’єднання вікон) потрібно надрукувати досі відкриті вкладки. Закриті вкладки видаляються з масиву, а нові (для спрощення) додаються в кінець. -Редактор коду показує реалізацію цієї функціональності з функціями: `tabOpen()`, `tabClose()`, and `join()`. Масив `tabs` - це частина об'єкту Window, яка зберігає назви відкритих сторінок. +У текстовому редакторі ця функціональність реалізована за допомогою функцій `tabOpen()`, `tabClose()` та `join()`. Масив `tabs` є частиною об’єкта-вікна, який зберігає назви відкритих сторінок. # --instructions-- -Перевірте код у редакторі. Метод, який він використовує, має побічні ефекти у програмі та спричиняє некоректну поведінку. Остаточний список відкритих вкладок, збережених у `finalTabs.tabs`, має бути `['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium', 'new tab', 'Netflix', 'YouTube', 'Vine', 'GMail', 'Work mail', 'Docs', 'freeCodeCamp', 'new tab']`, але список, створений кодом, трохи відрізняється. +Перевірте код у редакторі. Він використовує метод, який має побічні ефекти у програмі та спричиняє некоректну поведінку. Кінцевим списком відкритих вкладок, збережених у `finalTabs.tabs`, має бути `['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium', 'new tab', 'Netflix', 'YouTube', 'Vine', 'GMail', 'Work mail', 'Docs', 'freeCodeCamp', 'new tab']`, але список, який надав код, трішки відрізняється. -Змініть `Window.prototype.tabClose`, щоб видалити правильну вкладку. +Змініть `Window.prototype.tabClose` так, щоб видалялась правильна вкладка. # --hints-- -`finalTabs.tabs` мають бути `['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium', 'new tab', 'Netflix', 'YouTube', 'Vine', 'GMail', 'Work mail', 'Docs', 'freeCodeCamp', 'new tab']` +`finalTabs.tabs` має бути `['FB', 'Gitter', 'Reddit', 'Twitter', 'Medium', 'new tab', 'Netflix', 'YouTube', 'Vine', 'GMail', 'Work mail', 'Docs', 'freeCodeCamp', 'new tab']` ```js assert.deepEqual(finalTabs.tabs, [ diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md index 0278afabc98..d4c2c2e0408 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem.md @@ -1,6 +1,6 @@ --- id: 587d7b88367417b2b2512b45 -title: 'Використовуйте функції вищого порядку map, filter або reduce для розв''язання складних проблем' +title: 'Використання функцій вищого порядку (map, filter та reduce) для розв’язання складних задач' challengeType: 1 forumTopicId: 301311 dashedName: use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-problem @@ -8,30 +8,30 @@ dashedName: use-higher-order-functions-map-filter-or-reduce-to-solve-a-complex-p # --description-- -Тепер, коли ви розв'язали кілька проблем, використовуючи такі функції вищого порядку, як: `map()`, `filter()`, та `reduce()`, ви можете застосовувати їх для виконання складнішого завдання. +Ви вже працювали із функціями вищого порядку, як-от `map()`, `filter()` та `reduce()`, і зараз ви застосуєте їх для складнішого завдання. # --instructions-- -Завершіть код для функції `squareList` за допомогою комбінації `map()`, `filter()`, і `reduce()`. Функція має повернути новий масив, який містить квадрати *only* цілих натуральних чисел (десяткові числа не є цілими числами), коли до неї передається масив дійсних чисел. Приклад масиву дійсних чисел - `[-3, 4.8, 5, 3, -3.2]`. +Завершіть код для функції `squareList`, використовуючи будь-яку комбінацію `map()`, `filter()` та `reduce()`. Функція повинна повертати новий масив, який містить квадрати *лише* цілих натуральних чисел (десяткові числа не є цілими числами), коли до неї передається масив дійсних чисел. Приклад масиву дійсних чисел: `[-3, 4.8, 5, 3, -3.2]`. -**Примітка:** Ваша функція не повинна використовувати будь-які цикли `for` або `while`, або функцію `forEach()`. +**Примітка:** ваша функція не повинна використовувати цикли `for` чи `while`, або функцію `forEach()`. # --hints-- -`squareList` має бути `function`. +`squareList` повинна бути функцією (`function`). ```js assert.typeOf(squareList, 'function'), 'squareList should be a function'; ``` -Не слід використовувати `for`, `while` та `forEach`. +Ви не повинні використовувати `for`, `while` або `forEach`. ```js assert(!code.match(/for|while|forEach/g)); ``` -Слід використовувати `map`, `filter` або `reduce`. +Ви повинні використовувати `map`, `filter` або `reduce`. ```js assert( @@ -47,7 +47,7 @@ assert( assert(Array.isArray(squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]))); ``` -`squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2])` повинна повертати `[16, 1764, 36]`. +`squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2])` має повертати `[16, 1764, 36]`. ```js assert.deepStrictEqual(squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]), [ @@ -57,7 +57,7 @@ assert.deepStrictEqual(squareList([4, 5.6, -9.8, 3.14, 42, 6, 8.34, -2]), [ ]); ``` -`squareList([-3.7, -5, 3, 10, 12.5, 7, -4.5, -17, 0.3])` повинна повертати `[9, 100, 49]`. +`squareList([-3.7, -5, 3, 10, 12.5, 7, -4.5, -17, 0.3])` має повертати `[9, 100, 49]`. ```js assert.deepStrictEqual(squareList([-3.7, -5, 3, 10, 12.5, 7, -4.5, -17, 0.3]), [ diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md index 8c5f7ca3f77..42ddd4d776b 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria.md @@ -1,6 +1,6 @@ --- id: 587d7dab367417b2b2512b6e -title: Використовуйте кожен метод, щоб перевірити, чи кожний елемент у масиві відповідає критеріям +title: Використання методу every для перевірки всіх елементів на відповідність критеріям challengeType: 1 forumTopicId: 301312 dashedName: use-the-every-method-to-check-that-every-element-in-an-array-meets-a-criteria @@ -8,9 +8,9 @@ dashedName: use-the-every-method-to-check-that-every-element-in-an-array-meets-a # --description-- -Метод `every` працює з масивами, щоб перевірити, чи проходить елемент *every* певний тест. Якщо всі значення відповідають критеріям, то він повертає булеве значення `true`, якщо ж ні, тоді - `false`. +Метод `every` працює з масивами, щоб перевірити, чи *кожен* елемент проходить певний тест. Він повертає булеве значення: `true`, якщо всі значення відповідають критеріям або `false`, якщо навпаки. -Наприклад, наступний код перевіряє чи кожен елемент в масиві `numbers` менший за 10: +Наприклад, наступний код перевіряє, чи всі елементи в масиві `numbers` менші за 10: ```js const numbers = [1, 5, 8, 0, 10, 11]; @@ -20,11 +20,11 @@ numbers.every(function(currentValue) { }); ``` -В цьому випадку метод `every` поверне `false`. +Метод `every` поверне `false`. # --instructions-- -Використовуйте метод `every` всередині функції `checkPositive`, щоб перевірити, чи кожний елемент у `arr` додатній. Функція має повернути булеве значення. +Використайте метод `every` всередині функції `checkPositive`, щоб перевірити, чи всі елементи в `arr` додатні. Функція повинна повертати булеве значення. # --hints-- @@ -34,19 +34,19 @@ numbers.every(function(currentValue) { assert(code.match(/\.every/g)); ``` -`checkPositive([1, 2, 3, -4, 5])` має повернути `false`. +`checkPositive([1, 2, 3, -4, 5])` має повертати `false`. ```js assert.isFalse(checkPositive([1, 2, 3, -4, 5])); ``` -`checkPositive([1, 2, 3, 4, 5])` має повернути `true`. +`checkPositive([1, 2, 3, 4, 5])` має повертати `true`. ```js assert.isTrue(checkPositive([1, 2, 3, 4, 5])); ``` -`checkPositive([1, -2, 3, -4, 5])` має повернути `false`. +`checkPositive([1, -2, 3, -4, 5])` має повертати `false`. ```js assert.isFalse(checkPositive([1, -2, 3, -4, 5])); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md index aaa8dd559e8..ef6e91fcfc3 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-filter-method-to-extract-data-from-an-array.md @@ -1,6 +1,6 @@ --- id: 587d7b8f367417b2b2512b63 -title: Використовуйте метод фільтру, щоб отримати дані з сукупності елементів +title: Використання методу filter для отримання даних з масиву challengeType: 1 forumTopicId: 18179 dashedName: use-the-filter-method-to-extract-data-from-an-array @@ -8,13 +8,13 @@ dashedName: use-the-filter-method-to-extract-data-from-an-array # --description-- -Інша зручна формула масиву є `Array.prototype.filter()`, або ж просто `filter()`. +Ще одною корисною функцією масиву є `Array.prototype.filter()`, або просто `filter()`. -`filter` calls a function on each element of an array and returns a new array containing only the elements for which that function returns a truthy value - that is, a value which returns `true` if passed to the `Boolean()` constructor. Іншими словами, він фільтрує масив, на основі функції, яка передана до нього. Як і `map`, це робиться без необхідності зміни початкового масиву. +`filter` викликає функцію для кожного елемента масиву та повертає новий масив, що містить лише елементи, для яких функція повертає істинне значення (значення, яке повертає `true`, якщо передано до конструктора `Boolean()`). Іншими словами, вона фільтрує масив на основі переданої функції. Як і `map`, це робиться без необхідності зміни початкового масиву. -Функція зворотнього виклику приймає три аргументи. Перший аргумент - це поточний елемент, який опрацьовується. Другий є індексом цього елемента, а третій - масивом, на якому було викликано метод `filter`. +Функція зворотного виклику приймає три аргументи. Першим аргументом є елемент, який наразі опрацьовується. Другим аргументом є індекс цього елемента, а третій є масивом, на якому було викликано метод `filter`. -Нижче наведено приклад використання методу `filter` у масиві `users` для повернення нового масиву, що містить лише імена користувачів віком до 30 років. Для простоти у прикладі використовується лише перший аргумент зворотного виклику. +Нижче наведено приклад використання методу `filter` на масиві `users`, що повертає новий масив з іменами користувачів, які не досягли 30-річного віку. Аби було простіше, у прикладі використовується лише перший аргумент зворотного виклику. ```js const users = [ @@ -27,15 +27,15 @@ const usersUnder30 = users.filter(user => user.age < 30); console.log(usersUnder30); ``` -Консоль відображатиме значення `[ { name: 'Amy', age: 20 }, { name: 'camperCat', age: 10 } ]`. +Консоль показуватиме значення `[ { name: 'Amy', age: 20 }, { name: 'camperCat', age: 10 } ]`. # --instructions-- -Змінний `watchList` утримує масив об'єктів з інформацією про декілька фільмів. Використовуйте комбінацію `filter` and `map` на `watchList`, щоб задати новий масив об'єктів тільки з ключами доступу `title` і `rating`. Новий масив повинен включати в себе лише об’єкти, де `imdbRating` більше або дорівнює 8.0. Зверніть увагу, що значення `rating` збережено як рядки у об'єкті і вам може знадобитися конвертувати їх на числа для виконання математичних операцій з ними. +Змінна `watchList` містить масив об’єктів з інформацією про декілька фільмів. Використайте комбінацію `filter` та `map` на `watchList`, щоб отримати новий масив об’єктів із ключами `title` та `rating`. Новий масив повинен містити лише ті об’єкти, де `imdbRating` більше або дорівнює 8.0. Зверніть увагу, що значення `rating` збережено в об’єкті як рядки і, можливо, вам знадобиться конвертувати їх у числа, щоб виконати математичні операції. # --hints-- -Змінний `watchList` не повинен змінюватись. +Змінна `watchList` не повинна змінюватися. ```js assert( diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md index 410920fdcac..1fe1c5576cc 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-map-method-to-extract-data-from-an-array.md @@ -1,6 +1,6 @@ --- id: 587d7b8f367417b2b2512b61 -title: Використовувати метод map для отримання даних з масиву +title: Використання методу map для отримання даних з масиву challengeType: 1 forumTopicId: 18214 dashedName: use-the-map-method-to-extract-data-from-an-array @@ -8,19 +8,19 @@ dashedName: use-the-map-method-to-extract-data-from-an-array # --description-- -Поки що ми навчилися використовувати чисті функції, щоб уникати побічних ефектів в програмі. Крім того, ми побачили, що значення функції залежить тільки від її вхідних аргументів. +Ми вже навчилися використовувати чисті функції, щоб уникнути побічних ефектів в програмі. Крім того, ми побачили, що значення функції залежить тільки від її вхідних аргументів. -Це лише початок. Як випливає з назви, функціональне програмування зосереджено навколо теорії функцій. +Це лише початок. Як випливає з назви, функційне програмування зосереджене на функціях. -Мало б сенс мати можливість передати їх в якості аргументів інших функцій, і повернути з іншої функції. Функції вважаються об’єктами першого класу у JavaScript і означає, що вони можуть бути використані як і будь -який інший об’єкт. Вони можуть бути збережені у змінних, що зберігаються в об'єкті або передаються у вигляді аргументів функції. +Було б логічно мати можливість передати функції як аргументи до інших функцій, та повернути їх з іншої функції. Функції вважаються об’єктами першого класу у JavaScript, тобто їх можна використовувати як і будь-який інший об’єкт. Їх можна зберегти у змінних чи об’єктах, або передати як аргументи функції. -Почнемо з деяких простих функцій масиву, які є методами об'єкта масиву прототипу. У цій вправі ми розглядаємо `Array.prototype.map()`, або простіше кажучи `map`. +Почнемо з деяких простих функцій масиву, які є методами прототипу об’єкта масиву. У цьому завданні ми розглянемо `Array.prototype.map()`, або просто `map`. Метод `map` перебирає кожен елемент у масиві та повертає новий масив, що містить результати функції зворотного виклику для кожного елемента. Це виконується без мутації вихідного масиву. -При використанні зворотного виклику передається три аргументи. Перший аргумент є поточним елементом який обробляється. Другий - індекс цього елемента, а третій - масив, на якому є так званий метод`map`. +При використанні зворотного виклику передається три аргументи. Першим аргументом є елемент, який наразі опрацьовується. Другим аргументом є індекс цього елемента, а третій є масивом, на якому було викликано метод `map`. -Нижче наведено приклад використання методу `map` у масиві `users` для повернення нового масиву, що містить лише імена користувачів в якості елементів. Для простоти у прикладі використовується лише перший аргумент функції зворотного виклику. +Нижче наведено приклад використання методу `map` на масиві `users`, що повертає новий масив з іменами користувачів у вигляді елементів. Для простоти у прикладі використовується лише перший аргумент функції зворотного виклику. ```js const users = [ @@ -33,11 +33,11 @@ const names = users.map(user => user.name); console.log(names); ``` -На консолі відображатиметься значення `['John', 'Amy','camperCat']`. +Консоль показуватиме значення `[ 'John', 'Amy', 'camperCat' ]`. # --instructions-- -Масив `watchList` містить об’єкти з інформацією про декілька фільмів. Використовуйте `map` у `watchList`, щоб призначити новий масив об’єктів до `ratings`змінної. Кожен фільм у новому масиві повинен мати лише ключ `title` з назвою фільму та ключ `rating` з рейтингом IMDB. В редакторі зараз використовується цикл `for`, тому слід замінити функціональність циклу виразом `map`. +Масив `watchList` містить об’єкти з інформацією про декілька фільмів. Використайте `map` на `watchList`, щоб присвоїти новий масив об’єктів до змінної `ratings`. Кожен фільм у новому масиві повинен мати ключ `title` з назвою фільму та ключ `rating` з рейтингом IMDB. Наразі код у редакторі використовує цикл `for`, тому ви повинні замінити його на вираз `map`. # --hints-- diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.md index 2acadadd5e9..9414ca6c064 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-reduce-method-to-analyze-data.md @@ -1,6 +1,6 @@ --- id: 587d7da9367417b2b2512b68 -title: Використовуйте метод reduce для аналізу даних +title: Використання методу reduce для аналізу даних challengeType: 1 forumTopicId: 301313 dashedName: use-the-reduce-method-to-analyze-data @@ -8,15 +8,15 @@ dashedName: use-the-reduce-method-to-analyze-data # --description-- -`Array.prototype.reduce()` або просто `reduce()` - це найзагальніша з усіх операцій з масивами в JavaScript. Ви можете вирішити практично будь -яку проблему з обробкою масиву, використовуючи метод `reduce`. +`Array.prototype.reduce()`, або просто `reduce()` – найпоширеніша операція із масивами у JavaScript. Ви можете вирішити практично будь-яку проблему обробки масиву, використовуючи метод `reduce`. -Метод `reduce` дозволяє використовувати більш загальні форми обробки масивів, і можна показати, що і `filter`, і `map` можуть бути отримані як спеціальні програми `reduce`. Метод `reduce` перебирає кожен елемент у масиві та повертає єдине значення (тобто рядок, число, об’єкт, масив). Це досягається за допомогою функції зворотного виклику, яка відбувається на кожній ітерації. +Метод `reduce` дозволяє використовувати загальні форми обробки масивів і можна сказати, що `filter` та `map` є похідними від `reduce`. Метод `reduce` перебирає кожен елемент у масиві та повертає єдине значення (тобто рядок, число, об’єкт, масив). Це досягається за допомогою функції зворотного виклику, яка відбувається на кожній ітерації. -Функція зворотного виклику приймає чотири аргументи. Перший аргумент відомий як акумулятор, якому призначається повернене значення функції зворотного виклику з попередньої ітерації, другий - поточний елемент, що обробляється, третій - індекс цього елемента, а четвертий - масив, < code>reduce на який звернений виклик. +Функція зворотного виклику приймає чотири аргументи. Перший аргумент відомий як акумулятор, якому призначається повернене значення функції зворотного виклику з попередньої ітерації. Другим є елемент, який наразі опрацьовується. Третім є індекс цього елемента. Четвертий – це масив, на якому було викликано `reduce`. -На додаток до функції зворотного виклику, `reduce` має додатковий параметр, який приймає початкове значення для підсумовуюючого регістру. Якщо цей другий параметр не використовується, то перша ітерація пропускається, а друга передається першому елементу масиву як акумулятору. +Крім того, `reduce` має додатковий параметр, який приймає початкове значення акумулятора. Якщо цей другий параметр не використовується, то перша ітерація пропускається, а друга передається першому елементу масиву як акумулятор. -Нижче наведено приклад використання `reduce` у масиві `users`, щоб повернути суму всіх вікових категорій користувачів. Для простоти у прикладі використовуються лише перший і другий аргументи. +Нижче наведено приклад використання `reduce` на масиві `users`, що повертає сумарний вік усіх користувачів. Аби було простіше, у прикладі використовується лише перший та другий аргументи. ```js const users = [ @@ -29,9 +29,9 @@ const sumOfAges = users.reduce((sum, user) => sum + user.age, 0); console.log(sumOfAges); ``` -На консолі відображатиметься значення `64`. +Консоль показуватиме значення `64`. -В іншому прикладі можна побачити, як об'єкт може бути повернутий, що містить імена користувачів, які становлять таку ж цінність як і властивості щодо їх віку. +В іншому прикладі можна побачити, що повернутий об’єкт може містить імена користувачів як властивості та їхній вік як значення. ```js const users = [ @@ -47,11 +47,11 @@ const usersObj = users.reduce((obj, user) => { console.log(usersObj); ``` -На консолі відображатиметься значення `{John: 34, Amy: 20, camperCat: 10}`. +Консоль показуватиме значення `{ John: 34, Amy: 20, camperCat: 10 }`. # --instructions-- -Змінна `watchList` містить масив об’єктів з інформацією щодо декількох фільмів. Використовуйте `reduce`, щоб знайти середній рейтинг IMDB фільмів режисера `Крістофера Нолана`. Пригадайте з попередніх проблем, як дані `filter` та `map` можуть витягнути те, що нам потрібно. Можливо, доведеться створити інші змінні та повернути середній рейтинг із функції `getRating`. Зверніть увагу, що рейтингові значення зберігаються як рядки в об’єкті і їх потрібно перетворити в числа перш ніж вони будуть використані в будь-яких математичних операціях. +Змінна `watchList` містить масив об’єктів з інформацією про декілька фільмів. Використайте `reduce`, щоб знайти середній рейтинг IMDB фільмів, режисером яких є `Christopher Nolan`. Пригадайте з попередніх завдань, як вам можуть допомогти `filter` та `map`. Можливо, доведеться створити інші змінні та повернути середній рейтинг із функції `getRating`. Зверніть увагу, що рейтинги зберігаються в об’єктах як рядки і їх потрібно перетворити на числа, перш ніж використовувати в математичних операціях. # --hints-- @@ -81,7 +81,7 @@ assert(getRating(watchList) === 8.675); assert(!code.match(/for\s*?\([\s\S]*?\)/g)); ``` -Ваш код повинен повернути правильний висновок після зміни об’єкта `watchList`. +Ваш код повинен повернути правильні вихідні дані після зміни об’єкта `watchList`. ```js assert(getRating(watchList.filter((_, i) => i < 1 || i > 2)) === 8.55); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md index bdc3129a92c..49c85a7767a 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/functional-programming/use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria.md @@ -1,6 +1,6 @@ --- id: 587d7dab367417b2b2512b6f -title: Використовуйте метод some, щоб перевірити, чи будь-які елементи в масиві відповідають критеріям +title: Використання методу some для перевірки будь-яких елементів на відповідність критеріям challengeType: 1 forumTopicId: 301314 dashedName: use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-criteria @@ -8,9 +8,9 @@ dashedName: use-the-some-method-to-check-that-any-elements-in-an-array-meet-a-cr # --description-- -Метод `some` працює з масивами, щоб перевірити, чи проходить елемент *any* певний тест. Якщо будь-яке зі значень відповідає критеріям, то він повертає булеве значення `true`, якщо ж ні, тоді - `false`. +Метод `some` працює з масивами, щоб перевірити, чи *будь-який* елемент проходить певний тест. Він повертає булеве значення: `true`, якщо значення відповідає критеріям або `false`, якщо навпаки. -Наприклад, наступний код перевіряє чи будь-який елемент в масиві `numbers` менший за 10: +Наприклад, наступний код перевіряє, чи будь-який елемент в масиві `numbers` менший за 10: ```js const numbers = [10, 50, 8, 220, 110, 11]; @@ -24,7 +24,7 @@ numbers.some(function(currentValue) { # --instructions-- -Використовуйте метод `some` всередині функції `checkPositive`, щоб перевірити, чи будь-який елемент у `arr` додатній. Функція повинна повертати булеве значення. +Використайте метод `some` всередині функції `checkPositive`, щоб перевірити, чи будь-який елемент в `arr` додатній. Функція повинна повертати булеве значення. # --hints-- @@ -34,19 +34,19 @@ numbers.some(function(currentValue) { assert(code.match(/\.some/g)); ``` -`checkPositive([1, 2, 3, -4, 5])` повинна повертати `true`. +`checkPositive([1, 2, 3, -4, 5])` має повертати `true`. ```js assert(checkPositive([1, 2, 3, -4, 5])); ``` -`checkPositive([1, 2, 3, 4, 5])` повинна повертати `true`. +`checkPositive([1, 2, 3, 4, 5])` має повертати `true`. ```js assert(checkPositive([1, 2, 3, 4, 5])); ``` -`checkPositive([-1, -2, -3, -4, -5])` повинна повертати `false`. +`checkPositive([-1, -2, -3, -4, -5])` має повертати `false`. ```js assert(!checkPositive([-1, -2, -3, -4, -5])); diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md index 9e51b56840f..9547cbec9fb 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/american-british-translator.md @@ -282,7 +282,7 @@ async (getUserInput) => { }; ``` -Усі 24 модульних тестів завершено та успішно пройдено. Перегляньте `/tests/1_unit-tests.js` очікуваної поведінки, для якої ви пишете тести. +All 24 unit tests are complete and passing. ```js async (getUserInput) => { @@ -307,7 +307,7 @@ async (getUserInput) => { }; ``` -Усі 6 функціональних тестів завершено та успішно пройдено. Перегляньте `/tests/2_functional-tests.js` функціональності, для якої ви пишете тести. +All 6 functional tests are complete and passing. ```js async (getUserInput) => { diff --git a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md index ad3efdcfcee..d5336257398 100644 --- a/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md +++ b/curriculum/challenges/ukrainian/06-quality-assurance/quality-assurance-projects/sudoku-solver.md @@ -352,7 +352,7 @@ async (getUserInput) => { }; ``` -Усі 12 модульних тестів завершено та успішно пройдено. Перегляньте `/tests/1_unit-tests.js` очікуваної поведінки, для якої ви пишете тести. +All 12 unit tests are complete and passing. ```js async (getUserInput) => { @@ -377,7 +377,7 @@ async (getUserInput) => { }; ``` -Усі 14 функціональних тестів завершено та успішно пройдено. Перегляньте `/tests/2_functional-tests.js` функціональності, для якої ви пишете тести. +All 14 functional tests are complete and passing. ```js async (getUserInput) => {