diff --git a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 3a9ad3f9b05..30ef65666c3 100644 --- a/curriculum/challenges/arabic/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/arabic/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ dashedName: step-24 assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -يجب أن يحتوي عنصر `th` الخاص بك على النص `Total Liabilities`. +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -يجب أن تغلف النص `Liabilities` في عنصر `span`. +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -يجب أن يحتوي عنصر `span` على سمة `class` بقيمة `sr-only`. +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -يجب أن يكون لديك ثلاثة عناصر `td`. +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -يجب أن يحتوي العنصر `td` الاول على النص `$750`. +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -يجب أن يحتوي العنصر `td` الثاني على النص `$600`. +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -يجب أن يحتوي العنصر `td` الثالث على النص `$475`. +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -عنصر `td` الثالث الخاص بك يجب أن يحتوي على `class` بقيمة `current`. +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index aa285f8a5e2..de543cc72b4 100644 --- a/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/chinese-traditional/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ dashedName: step-24 assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -`th` 元素應包含文本 `Total Liabilities`。 +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -應該將文本 `Liabilities` 包裝在 `span` 元素中。 +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -`span` 元素應該將 `class` 屬性設置爲 `sr-only`。 +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -應該有三個 `td` 元素。 +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -第一個 `td` 元素應該包含文本 `$750`。 +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -第二個 `td` 元素應該包含文本 `$600`。 +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -第三個 `td` 元素應該包含文本 `$475`。 +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -第三個 `td` 元素應該將 `class` 設置爲 `current`。 +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/chinese-traditional/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md b/curriculum/challenges/chinese-traditional/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md index fe640ea8266..a6f2e93048b 100644 --- a/curriculum/challenges/chinese-traditional/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md +++ b/curriculum/challenges/chinese-traditional/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md @@ -13,7 +13,7 @@ After going to that link, create a copy of the notebook either in your own accou # --instructions-- -For this challenge, you need to create a graphing calculator using Python that can take input and do the following: +在這項挑戰中,你需要使用 Python 創建一個圖形計算器,計算器可以接受輸入並實現以下功能: - Graph one or more functions - Create a table of (x,y) values diff --git a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 392931f8a1a..6e0d95083af 100644 --- a/curriculum/challenges/chinese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/chinese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ dashedName: step-24 assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -`th` 元素应包含文本 `Total Liabilities`。 +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -应该将文本 `Liabilities` 包装在 `span` 元素中。 +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -`span` 元素应该将 `class` 属性设置为 `sr-only`。 +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -应该有三个 `td` 元素。 +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -第一个 `td` 元素应该包含文本 `$750`。 +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -第二个 `td` 元素应该包含文本 `$600`。 +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -第三个 `td` 元素应该包含文本 `$475`。 +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -第三个 `td` 元素应该将 `class` 设置为 `current`。 +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/chinese/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md b/curriculum/challenges/chinese/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md index fe640ea8266..f346a339431 100644 --- a/curriculum/challenges/chinese/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md +++ b/curriculum/challenges/chinese/17-college-algebra-with-python/build-a-graphing-calculator-project/build-a-graphing-calculator.md @@ -13,7 +13,7 @@ After going to that link, create a copy of the notebook either in your own accou # --instructions-- -For this challenge, you need to create a graphing calculator using Python that can take input and do the following: +在这项挑战中,你需要使用 Python 创建一个图形计算器,计算器可以接受输入并实现以下功能: - Graph one or more functions - Create a table of (x,y) values diff --git a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 04be18c31b8..11feb990a9d 100644 --- a/curriculum/challenges/espanol/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/espanol/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ Tu cuarto `tr` debe tener un elemento `th`. assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -Tu elemento `th` debe tener el texto `Total Liabilities`. +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -Debes envolver el texto `Liabilities` en un elemento `span`. +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -Tu elemento `span` debe tener el atributo `class` establecido en `sr-only`. +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -Debes tener tres elementos `td`. +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -Tu primer elemento `td` debe tener el texto `$750`. +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -Tu segundo elemento `td` debe tener el texto `$600`. +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -Tu tercer elemento `td` debe tener el texto `$475`. +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -Tu tercer elemento `td` debe tener el `class` establecido en `current`. +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 9df92b0a789..a5c1853fab5 100644 --- a/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/german/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,6 +19,12 @@ Your fourth `tr` should have a `th` element. assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + Your `th` element should have the text `Total Liabilities`. ```js diff --git a/curriculum/challenges/italian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/italian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 074735da1bd..66f28193d43 100644 --- a/curriculum/challenges/italian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/italian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ Il quarto `tr` dovrebbe avere un elemento `th`. assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -L'elemento `th` dovrebbe avere il testo `Total Liabilities`. +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -Dovresti racchiudere il testo `Liabilities` in un elemento `span`. +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -L'elemento `span` dovrebbe avere l'attributo `class` con il valore `sr-only`. +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -Dovresti avere tre elementi `td`. +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -Il primo elemento `td` dovrebbe avere il testo `$750`. +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -Il secondo elemento `td` dovrebbe avere il testo `$600`. +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -Il terzo elemento `td` dovrebbe avere il testo `$475`. +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -Il terzo elemento `td` dovrebbe avere l'attributo `class` con il valore `current`. +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-100-arranged-probability.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-100-arranged-probability.md index 4507fa49c56..f5945649994 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-100-arranged-probability.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-100-arranged-probability.md @@ -1,6 +1,6 @@ --- id: 5900f3d01000cf542c50fee3 -title: 'Problem 100: Arranged probability' +title: 'Problema 100: probabilità degli arrangiamenti' challengeType: 1 forumTopicId: 301724 dashedName: problem-100-arranged-probability @@ -8,47 +8,47 @@ dashedName: problem-100-arranged-probability # --description-- -If a box contains twenty-one colored discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs. +Se una scatola contiene ventuno dischi colorati, composti da quindici dischi blu e sei dischi rossi, e due dischi sono stati prelevati a caso, si può vedere la probabilità di prendere due dischi blu. -$${P(BB)} = \frac{15}{21}×\frac{14}{20} = \frac{1}{2}$$ +$$${P(BB)} = \frac{15}{21}×\frac{14}{20} = \frac{1}{2}$$ -The next such arrangement, for which there is exactly a 50% chance of taking two blue discs at random, is a box containing eighty-five blue discs and thirty-five red discs. +Il prossimo arrangiamento, per il quale vi è esattamente una probabilità del 50% di prendere due dischi blu a caso, è una scatola contenente ottantacinque dischi blu e trentacinque dischi rossi. -By finding the first arrangement to contain over `limit` discs in total, determine the number of blue discs that the box would contain. +Trovando la prima disposizione che contiene più di `limit` dischi in totale, determina il numero di dischi blu che contiene la scatola. # --hints-- -`arrangedProbability(20)` should return a number. +`arrangedProbability(20)` dovrebbe restituire un numero. ```js assert(typeof arrangedProbability(10) === 'number'); ``` -`arrangedProbability(20)` should return `15`. +`arrangedProbability(20)` dovrebbe restituire `15`. ```js assert.strictEqual(arrangedProbability(20), 15); ``` -`arrangedProbability(100)` should return `85`. +`arrangedProbability(100)` dovrebbe restituire `85`. ```js assert.strictEqual(arrangedProbability(100), 85); ``` -`arrangedProbability(100000)` should return `97513`. +`arrangedProbability(100000)` dovrebbe restituire `97513`. ```js assert.strictEqual(arrangedProbability(100000), 97513); ``` -`arrangedProbability(1000000000)` should return `3822685023`. +`arrangedProbability(1000000000)` dovrebbe restituire `3822685023`. ```js assert.strictEqual(arrangedProbability(1000000000), 3822685023); ``` -`arrangedProbability(1000000000000)` should return `756872327473`. +`arrangedProbability(1000000000000)` dovrebbe restituire `756872327473`. ```js assert.strictEqual(arrangedProbability(1000000000000), 756872327473); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-92-square-digit-chains.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-92-square-digit-chains.md index e83d9f690f9..2a246966a47 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-92-square-digit-chains.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-92-square-digit-chains.md @@ -15,37 +15,37 @@ Ad esempio, $$\begin{align} & 44 → 32 → 13 → 10 → \boldsymbol{1} → \boldsymbol{1}\\\\ & 85 → \boldsymbol{89} → 145 → 42 → 20 → 4 → 16 → 37 → 58 → \boldsymbol{89}\\\\ \end{align}$$ -Therefore any chain that arrives at 1 or 89 will become stuck in an endless loop. What is most amazing is that EVERY starting number will eventually arrive at 1 or 89. +Quindi ogni catena che arriva ad 1 o 89 si bloccherà in un loop senza fine. La cosa affascinante è che OGNI numero iniziale arriverà prima o poi a 1 o 89. -How many starting numbers below `limit` will arrive at 89? +Quanti numeri iniziali sotto `limit` arriveranno ad 89? # --hints-- -`squareDigitChains(100)` should return a number. +`squareDigitChains(100)` dovrebbe restituire un numero. ```js assert(typeof squareDigitChains(100) === 'number'); ``` -`squareDigitChains(100)` should return `80`. +`squareDigitChains(100)` dovrebbe restituire `80`. ```js assert.strictEqual(squareDigitChains(100), 80); ``` -`squareDigitChains(1000)` should return `857`. +`squareDigitChains(1000)` dovrebbe restituire `857`. ```js assert.strictEqual(squareDigitChains(1000), 857); ``` -`squareDigitChains(100000)` should return `85623`. +`squareDigitChains(100000)` dovrebbe restituire `85623`. ```js assert.strictEqual(squareDigitChains(100000), 85623); ``` -`squareDigitChains(10000000)` should return `8581146`. +`squareDigitChains(10000000)` dovrebbe restituire `8581146`. ```js assert.strictEqual(squareDigitChains(10000000), 8581146); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-93-arithmetic-expressions.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-93-arithmetic-expressions.md index 5a8afb7d782..12f9fd7ddcf 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-93-arithmetic-expressions.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-93-arithmetic-expressions.md @@ -1,6 +1,6 @@ --- id: 5900f3ca1000cf542c50fedc -title: 'Problem 93: Arithmetic expressions' +title: 'Problema 93: espressioni aritmetiche' challengeType: 1 forumTopicId: 302210 dashedName: problem-93-arithmetic-expressions @@ -8,9 +8,9 @@ dashedName: problem-93-arithmetic-expressions # --description-- -By using each of the digits from the set, {1, 2, 3, 4}, exactly once, and making use of the four arithmetic operations (+, −, \*, /) and brackets/parentheses, it is possible to form different positive integer targets. +Utilizzando ciascuna delle cifre dall'insieme {1, 2, 3, 4} esattamente una volta, e facendo uso delle quattro operazioni aritmetiche (+, −, \*, /) e delle parentesi, è possibile formare diversi target interi positivi. -For example, +Ad esempio,
8 = (4 * (1 + 3)) / 2
@@ -19,21 +19,21 @@ For example, 36 = 3 * 4 * (2 + 1)
-Note that concatenations of the digits, like 12 + 34, are not allowed. +Nota che le concatenazioni delle cifre, come 12 + 34, non sono permesse. -Using the set, {1, 2, 3, 4}, it is possible to obtain thirty-one different target numbers of which 36 is the maximum, and each of the numbers 1 to 28 can be obtained before encountering the first non-expressible number. +Utilizzando il set {1, 2, 3, 4} è possibile ottenere trentuno numeri target diversi, di cui 36 è il massimo, e ciascuno dei numeri da 1 a 28 può essere ottenuto prima di incontrare il primo numero non esprimibile. -Find the set of four distinct digits, `a` < `b` < `c` < `d`, for which the longest set of consecutive positive integers, 1 to `n`, can be obtained, giving your answer as a string: `abcd`. +Trova l'insieme di quattro cifre distinte, `a` < `b` < `c` < `d`, per cui può essere ottenuto il set più lungo di numeri interi positivi consecutivi, da 1 a `n`, dando la tua risposta come stringa: `abcd`. # --hints-- -`arithmeticExpressions()` should return a number. +`arithmeticExpressions()` dovrebbe restituire un numero. ```js assert(typeof arithmeticExpressions() === 'number'); ``` -`arithmeticExpressions()` should return 1258. +`arithmeticExpressions()` dovrebbe restituire 1258. ```js assert.strictEqual(arithmeticExpressions(), 1258); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-94-almost-equilateral-triangles.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-94-almost-equilateral-triangles.md index 4b3ab85e079..f1ecfd6b031 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-94-almost-equilateral-triangles.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-94-almost-equilateral-triangles.md @@ -1,6 +1,6 @@ --- id: 5900f3ca1000cf542c50fedd -title: 'Problem 94: Almost equilateral triangles' +title: 'Problema 94: triangoli quasi equilateri' challengeType: 1 forumTopicId: 302211 dashedName: problem-94-almost-equilateral-triangles @@ -8,39 +8,39 @@ dashedName: problem-94-almost-equilateral-triangles # --description-- -It is easily proved that no equilateral triangle exists with integral length sides and integral area. However, the almost equilateral triangle 5-5-6 has an area of 12 square units. +È facilmente dimostrabile che non esiste un triangolo equilatero con i lati di lunghezza intera e l'area intera. Tuttavia, il triangolo quasi equilatero 5-5-6 ha una superficie di 12 unità quadrate. -We shall define an almost equilateral triangle to be a triangle for which two sides are equal and the third differs by no more than one unit. +Definiremo un triangolo quasi equilatero come un triangolo per il quale due latri sono uguali e il terzo differisce per non più di un'unità. -Find the sum of the perimeters of all almost equilateral triangles with integral side lengths and area and whose perimeters do not exceed `limit`. +Trova la somma dei perimetri di tutti i triangoli quasi equilateri con lunghezze dei lati e area interi e i cui perimetri non superano `limit`. # --hints-- -`almostEquilateralTriangles(50)` should return a number. +`almostEquilateralTriangles(50)` dovrebbe restituire un numero. ```js assert(typeof almostEquilateralTriangles(50) === 'number'); ``` -`almostEquilateralTriangles(50)` should return `66`. +`almostEquilateralTriangles(50)` dovrebbe restituire `66`. ```js assert.strictEqual(almostEquilateralTriangles(50), 66); ``` -`almostEquilateralTriangles(10000)` should return `3688`. +`almostEquilateralTriangles(10000)` dovrebbe restituire `3688`. ```js assert.strictEqual(almostEquilateralTriangles(10000), 3688); ``` -`almostEquilateralTriangles(10000000)` should return `9973078`. +`almostEquilateralTriangles(10000000)` dovrebbe restituire `9973078`. ```js assert.strictEqual(almostEquilateralTriangles(10000000), 9973078); ``` -`almostEquilateralTriangles(1000000000)` should return `518408346`. +`almostEquilateralTriangles(1000000000)` dovrebbe restituire `518408346`. ```js assert.strictEqual(almostEquilateralTriangles(1000000000), 518408346); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-95-amicable-chains.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-95-amicable-chains.md index fe2d422a206..0b7555e3ee6 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-95-amicable-chains.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-95-amicable-chains.md @@ -1,6 +1,6 @@ --- id: 5900f3cc1000cf542c50fede -title: 'Problem 95: Amicable chains' +title: 'Problema 95: catene amicabili' challengeType: 1 forumTopicId: 302212 dashedName: problem-95-amicable-chains @@ -8,45 +8,45 @@ dashedName: problem-95-amicable-chains # --description-- -The proper divisors of a number are all the divisors excluding the number itself. For example, the proper divisors of 28 are 1, 2, 4, 7, and 14. As the sum of these divisors is equal to 28, we call it a perfect number. +I divisori propri di un numero sono tutti i divisori, escluso il numero stesso. Ad esempio, i divisori propri di 28 sono 1, 2, 4, 7 e 14. Poiché la somma di questi divisori è uguale a 28, lo chiamiamo numero perfetto. -Interestingly the sum of the proper divisors of 220 is 284 and the sum of the proper divisors of 284 is 220, forming a chain of two numbers. For this reason, 220 and 284 are called an amicable pair. +È interessante notare che la somma dei divisori propri di 220 è 284 e la somma dei divisori propri di 284 è 220, il che forma una catena di due numeri. Per questo motivo, 220 e 284 sono detti coppia amicabile. -Perhaps less well known are longer chains. For example, starting with 12496, we form a chain of five numbers: +Forse meno note sono catene più lunghe. Per esempio, iniziando con 12496, formiamo una catena di cinque numeri: $$ 12496 → 14288 → 15472 → 14536 → 14264 \\,(→ 12496 → \cdots) $$ -Since this chain returns to its starting point, it is called an amicable chain. +Visto che la catena torna al punto iniziale, è detta catena amicabile. -Find the smallest member of the longest amicable chain with no element exceeding `limit`. +Trova l'elemento più piccolo della catena amicabile più lunga che non abbia alcun elemento maggiore di `limit`. # --hints-- -`amicableChains(300)` should return a number. +`amicableChains(300)` dovrebbe restituire un numero. ```js assert(typeof amicableChains(300) === 'number'); ``` -`amicableChains(300)` should return `220`. +`amicableChains(300)` dovrebbe restituire `220`. ```js assert.strictEqual(amicableChains(300), 220); ``` -`amicableChains(15000)` should return `220`. +`amicableChains(15000)` dovrebbe restituire `220`. ```js assert.strictEqual(amicableChains(15000), 220); ``` -`amicableChains(100000)` should return `12496`. +`amicableChains(100000)` dovrebbe restituire `12496`. ```js assert.strictEqual(amicableChains(100000), 12496); ``` -`amicableChains(1000000)` should return `14316`. +`amicableChains(1000000)` dovrebbe restituire `14316`. ```js assert.strictEqual(amicableChains(1000000), 14316); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-96-su-doku.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-96-su-doku.md index 098fdb0d398..42293983508 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-96-su-doku.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-96-su-doku.md @@ -1,6 +1,6 @@ --- id: 5900f3cc1000cf542c50fedf -title: 'Problem 96: Su Doku' +title: 'Problema 96: Su Doku' challengeType: 1 forumTopicId: 302213 dashedName: problem-96-su-doku @@ -8,7 +8,7 @@ dashedName: problem-96-su-doku # --description-- -Su Doku (Japanese meaning *number place*) is the name given to a popular puzzle concept. Its origin is unclear, but credit must be attributed to Leonhard Euler who invented a similar, and much more difficult, puzzle idea called Latin Squares. The objective of Su Doku puzzles, however, is to replace the blanks (or zeros) in a 9 by 9 grid in such that each row, column, and 3 by 3 box contains each of the digits 1 to 9. Below is an example of a typical starting puzzle grid and its solution grid. +Su Doku (in giapponese significa *posto del numero*) è il nome dato a un popolare tipo di puzzle. La sua origine non è chiara, ma il merito deve essere attribuito a Leonhard Euler che ha inventato un'idea di puzzle simile e molto più complicata chiamata Quadrati Latini. L'obiettivo del puzzle Su Doku, tuttavia, è quello di sostituire gli spazi vuoti (o zero) in una griglia 9 per 9 in modo che ogni riga, colonna e casella 3 per 3 contengano ciascuna delle cifre da 1 a 9. Di seguito è riportata un esempio di una tipica griglia puzzle iniziale e la sua griglia di soluzione.
@@ -100,27 +100,27 @@ Su Doku (Japanese meaning *number place*) is the name given to a popular puzzle
-A well constructed Su Doku puzzle has a unique solution and can be solved by logic, although it may be necessary to employ "guess and test" methods in order to eliminate options (there is much contested opinion over this). The complexity of the search determines the difficulty of the puzzle; the example above is considered easy because it can be solved by straight forward direct deduction. +Un puzzle Su Doku ben costruito ha una soluzione unica e può essere risolto con la logica, anche se può essere necessario utilizzare metodi "tenta e verifica" per eliminare le opzioni (ci sono molti pareri discordanti su questo). La complessità della ricerca determina la difficoltà del puzzle; l'esempio di cui sopra è considerato facile perché può essere risolto procedendo per deduzione diretta. -The `puzzlesArr` array contains different Su Doku puzzle strings ranging in difficulty, but all with unique solutions. +L'array `puzzlesArr` contiene diverse stringhe di puzzle Su Doku che variano in difficoltà, ma tutte con soluzioni uniche. -By solving all puzzles in `puzzlesArr`, find the sum of the 3-digit numbers found in the top left corner of each solution grid; for example, 483 is the 3-digit number found in the top left corner of the solution grid above. +Risolvendo tutti i puzzle in `puzzlesArr`, trova la somma dei numeri a 3 cifre trovati nell'angolo in alto a sinistra di ogni griglia risolta; ad esempio, 483 è il numero a 3 cifre trovato nell'angolo in alto a sinistra della griglia della soluzione qui sopra. # --hints-- -`suDoku(testPuzzles1)` should return a number. +`suDoku(testPuzzles1)` dovrebbe restituire un numero. ```js assert(typeof suDoku(_testPuzzles1) === 'number'); ``` -`suDoku(testPuzzles1)` should return `1190`. +`suDoku(testPuzzles1)` dovrebbe restituire `1190`. ```js assert.strictEqual(suDoku(_testPuzzles1), 1190); ``` -`suDoku(testPuzzles2)` should return `24702`. +`suDoku(testPuzzles2)` dovrebbe restituire `24702`. ```js assert.strictEqual(suDoku(_testPuzzles2), 24702); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-97-large-non-mersenne-prime.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-97-large-non-mersenne-prime.md index cabdb3486c9..0aba6e0a6e7 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-97-large-non-mersenne-prime.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-97-large-non-mersenne-prime.md @@ -1,6 +1,6 @@ --- id: 5900f3ce1000cf542c50fee0 -title: 'Problem 97: Large non-Mersenne prime' +title: 'Problema 97: grandi numeri primi non-Mersenne' challengeType: 1 forumTopicId: 302214 dashedName: problem-97-large-non-mersenne-prime @@ -8,39 +8,39 @@ dashedName: problem-97-large-non-mersenne-prime # --description-- -The first known prime found to exceed one million digits was discovered in 1999, and is a Mersenne prime of the form $2^{6972593} − 1$; it contains exactly 2,098,960 digits. Subsequently other Mersenne primes, of the form $2^p − 1$, have been found which contain more digits. +Il primo numero primo trovato sopra un milione di cifre è stato scoperto nel 1999, ed è un primo di Mersenne nella forma $2^{6972593} − 1$; contiene esattamente 2.098.960 cifre. Successivamente sono stati trovati altri primi di Mersenne, della forma $2^p − 1$, contenenti più cifre. -However, in 2004 there was found a massive non-Mersenne prime which contains 2,357,207 digits: $28433 × 2^{7830457} + 1$. +Tuttavia, nel 2004 è stato trovato un enorme primo non-Mersenne che contiene 2.357.207 cifre: $28433 × 2^{7830457} + 1$. -Find the last ten digits of that non-Mersenne prime in the form $multiplier × 2^{power} + 1$. +Trova le ultime dieci cifre di quel primo non-Mersenne nella forma $multiplier × 2^{power} + 1$. # --hints-- -`largeNonMersennePrime(19, 6833086)` should return a string. +`largeNonMersennePrime(19, 6833086)` dovrebbe restituire una stringa. ```js assert(typeof largeNonMersennePrime(19, 6833086) === 'string'); ``` -`largeNonMersennePrime(19, 6833086)` should return the string `3637590017`. +`largeNonMersennePrime(19, 6833086)` dovrebbe restituire la stringa `3637590017`. ```js assert.strictEqual(largeNonMersennePrime(19, 6833086), '3637590017'); ``` -`largeNonMersennePrime(27, 7046834)` should return the string `0130771969`. +`largeNonMersennePrime(27, 7046834)` dovrebbe restituire la stringa `0130771969`. ```js assert.strictEqual(largeNonMersennePrime(27, 7046834), '0130771969'); ``` -`largeNonMersennePrime(6679881, 6679881)` should return the string `4455386113`. +`largeNonMersennePrime(6679881, 6679881)` dovrebbe restituire la stringa `4455386113`. ```js assert.strictEqual(largeNonMersennePrime(6679881, 6679881), '4455386113'); ``` -`largeNonMersennePrime(28433, 7830457)` should return the string `8739992577`. +`largeNonMersennePrime(28433, 7830457)` dovrebbe restituire la stringa `8739992577`. ```js assert.strictEqual(largeNonMersennePrime(28433, 7830457), '8739992577'); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md index f54ab71dd62..7d43b640eeb 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md @@ -1,6 +1,6 @@ --- id: 5900f3cf1000cf542c50fee1 -title: 'Problem 98: Anagramic squares' +title: 'Problema 98: quadrati anagrammici' challengeType: 1 forumTopicId: 302215 dashedName: problem-98-anagramic-squares @@ -8,35 +8,35 @@ dashedName: problem-98-anagramic-squares # --description-- -By replacing each of the letters in the word CARE with 1, 2, 9, and 6 respectively, we form a square number: $1296 = 36^2$. What is remarkable is that, by using the same digital substitutions, the anagram, RACE, also forms a square number: $9216 = 96^2$. We shall call CARE (and RACE) a square anagram word pair and specify further that leading zeroes are not permitted, neither may a different letter have the same digital value as another letter. +Rimpiazzando ogni lettera nella parola CARE con 1, 2, 9, e 6, rispettivamente, formiamo un numero quadrato: $1296 = 36^2$. Quello che è degno di nota è che, usando la stessa sostituzione di cifre, l'anagramma, RACE, forma anch'esso un numero quadrato: $9216 = 96^2$. Chiamiamo CARE (e RACE) una coppia di parole di anagrammi quadrati e specifichiamo ulteriormente che gli zeri all'inizio del numero non sono permessi, e che due lettere diverse non possono avere lo stesso valore numerico. -Using the `words` array, find all the square anagram word pairs (a palindromic word is NOT considered to be an anagram of itself). +Usando l'array `words`, trova tutte le coppe di parole anagrammi quadrati (una parola palindroma NON è anagramma di sé stessa). -What is the largest square number formed by any member of such a pair? +Qual è il numero quadrato più grande formato da un qualsiasi membro di una tale coppia? -**Note:** All anagrams formed must be contained in the given `words` array. +**Nota:** tutti gli anagrammi formati devono essere contenuti nel dato array `words`. # --hints-- -`anagramicSquares(['CARE', 'RACE'])` should return a number. +`anagramicSquares(['CARE', 'RACE'])` dovrebbe restituire un numero. ```js assert(typeof anagramicSquares(['CARE', 'RACE']) === 'number'); ``` -`anagramicSquares(['CARE', 'RACE'])` should return `9216`. +`anagramicSquares(['CARE', 'RACE'])` dovrebbe restituire `9216`. ```js assert.strictEqual(anagramicSquares(['CARE', 'RACE']), 9216); ``` -`anagramicSquares(testWords1)` should return `4761`. +`anagramicSquares(testWords1)` dovrebbe restituire `4761`. ```js assert.strictEqual(anagramicSquares(_testWords1), 4761); ``` -`anagramicSquares(testWords2)` should return `18769`. +`anagramicSquares(testWords2)` dovrebbe restituire `18769`. ```js assert.strictEqual(anagramicSquares(_testWords2), 18769); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-99-largest-exponential.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-99-largest-exponential.md index af44a7d0bd7..13c0b7de6ea 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-99-largest-exponential.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-1-to-100/problem-99-largest-exponential.md @@ -1,6 +1,6 @@ --- id: 5900f3d01000cf542c50fee2 -title: 'Problem 99: Largest exponential' +title: 'Problema 99: Il più grande esponenziale' challengeType: 1 forumTopicId: 302216 dashedName: problem-99-largest-exponential @@ -8,27 +8,27 @@ dashedName: problem-99-largest-exponential # --description-- -Comparing two numbers written in index form like $2^{11}$ and $3^7$ is not difficult, as any calculator would confirm that $2^{11} = 2048 < 3^7 = 2187$. +Comparando due numeri scritti in forma di potenza come $2^{11}$ e $3^7$ non è difficile, ogni calcolatrice confermerebbe che 2^{11} = 2048 < 3^7 = 2187$. -However, confirming that $632382^{518061} < 519432^{525806}$ would be much more difficult, as both numbers contain over three million digits. +Tuttavia, confermare che $632382^{518061} < 519432 ^{525806}$ sarebbe molto più difficile, in quanto entrambi i numeri contengono oltre tre milioni di cifre. -Using the 2D `baseExp` array of base/exponent pairs, determine pair with the greatest numerical value and return it. +Utilizzando l'array 2D `baseExp` formato da coppie base/esponente, determina la coppia con il massimo valore numerico e restituiscila. # --hints-- -`largestExponential(testArray1)` should return an array. +`largestExponential(testArray1)` dovrebbe restituire un array. ```js assert(Array.isArray(largestExponential(_testArray1))); ``` -`largestExponential(testArray1)` should return `[840237, 507276]`. +`largestExponential(testArray1)` dovrebbe restituire `[840237, 507276]`. ```js assert.deepEqual(largestExponential(_testArray1), [840237, 507276]); ``` -`largestExponential(testArray2)` should return `[895447, 504922]`. +`largestExponential(testArray2)` dovrebbe restituire `[895447, 504922]`. ```js assert.deepEqual(largestExponential(_testArray2), [895447, 504922]); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-101-optimum-polynomial.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-101-optimum-polynomial.md index 803f95dc33e..c3262c501f3 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-101-optimum-polynomial.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-101-optimum-polynomial.md @@ -1,6 +1,6 @@ --- id: 5900f3d21000cf542c50fee4 -title: 'Problem 101: Optimum polynomial' +title: 'Problema 101: polinomiale ottimale' challengeType: 1 forumTopicId: 301725 dashedName: problem-101-optimum-polynomial @@ -8,31 +8,31 @@ dashedName: problem-101-optimum-polynomial # --description-- -If we are presented with the first k terms of a sequence it is impossible to say with certainty the value of the next term, as there are infinitely many polynomial functions that can model the sequence. +Se ci vengono presentati i primi k termini di una sequenza è impossibile dire con certezza il valore del prossimo termine, poiché ci sono infinite funzioni polinomiali che possono rappresentare la sequenza. -As an example, let us consider the sequence of cube numbers. This is defined by the generating function, $u_n = n^3: 1, 8, 27, 64, 125, 216, \ldots$ +Ad esempio, prendiamo in considerazione la sequenza delle potenze cubiche. Questa è definita dalla funzione generatrice, $u_n = n^3: 1, 8, 27, 64, 125, 216, \ldots$ -Suppose we were only given the first two terms of this sequence. Working on the principle that "simple is best" we should assume a linear relationship and predict the next term to be 15 (common difference 7). Even if we were presented with the first three terms, by the same principle of simplicity, a quadratic relationship should be assumed. +Supponiamo che ci siano stati dati soltanto i primi due termini di questa sequenza. Lavorando sul principio che "semplice è meglio" dovremmo assumere una relazione lineare e prevedere che il prossimo termine sarà 15 (differenza comune 7). Anche se ci sono stati presentati i primi tre termini, per lo stesso principio di semplicità, dovremmo ipotizzare una relazione quadratica. -We shall define $OP(k, n)$ to be the $n^{th}$ term of the optimum polynomial generating function for the first k terms of a sequence. It should be clear that $OP(k, n)$ will accurately generate the terms of the sequence for $n ≤ k$, and potentially the first incorrect term (FIT) will be $OP(k, k+1)$; in which case we shall call it a bad OP (BOP). +Definiremo $OP(k, n)$ come il $n^{th}$ termine della funzione generatrice polinomiale ottimale per i primi k termini di una sequenza. Dovrebbe essere chiaro che $OP(k, n)$ genererà con precisione i termini della sequenza per $n ≤ k$, e potenzialmente il primo termine errato (FIT) sarà $OP(k, k+1)$; in questo caso diremo che è un cattivo OP (BOP). -As a basis, if we were only given the first term of sequence, it would be most sensible to assume constancy; that is, for $n ≥ 2, OP(1, n) = u_1$. +Di base, se ci fosse stato dato solo il primo termine della sequenza, sarebbe più ragionevole assumere la costanza; cioè, per $n ≥ 2, OP(1, n) = u_1$. -Hence we obtain the following OPs for the cubic sequence: +Quindi otterremo i seguenti OP per la sequenza cubica: $$\begin{array}{ll} OP(1, n) = 1 & 1, {\color{red}1}, 1, 1, \ldots \\\\ OP(2, n) = 7n−6 & 1, 8, {\color{red}{15}}, \ldots \\\\ OP(3, n) = 6n^2−11n+6 & 1, 8, 27, {\color{red}{58}}, \ldots \\\\ OP(4, n) = n^3 & 1, 8, 27, 64, 125, \ldots \end{array}$$ -Clearly no BOPs exist for k ≥ 4. By considering the sum of FITs generated by the BOPs (indicated in $\color{red}{red}$ above), we obtain 1 + 15 + 58 = 74. Consider the following tenth degree polynomial generating function: +Chiaramente non esistono BOP per k ≥ 4. Considerando la somma delle FIT generate dai BOP (indicata in $\color{red}{red}$ sopra), otteniamo 1 + 15 + 58 = 74. Considera la seguente funzione generatrice polinomiale di decimo grado: $$u_n = 1 − n + n^2 − n^3 + n^4 − n^5 + n^6 − n^7 + n^8 − n^9 + n^{10}$$ -Find the sum of FITs for the BOPs. +Trova la somma delle FIT per i BOP. # --hints-- -`optimumPolynomial()` should return `37076114526`. +`optimumPolynomial()` dovrebbe restituire `37076114526`. ```js assert.strictEqual(optimumPolynomial(), 37076114526); diff --git a/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-102-triangle-containment.md b/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-102-triangle-containment.md index c90a827dda3..1ae63341804 100644 --- a/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-102-triangle-containment.md +++ b/curriculum/challenges/italian/18-project-euler/project-euler-problems-101-to-200/problem-102-triangle-containment.md @@ -8,9 +8,9 @@ dashedName: problem-102-triangle-containment # --description-- -Three distinct points are plotted at random on a Cartesian plane, for which -1000 ≤ x, y ≤ 1000, such that a triangle is formed. +Tre punti distinti sono tracciati a caso su un piano cartesiano, per il quale -1000 ≤ x, y ≤ 1000, in modo che si formi un triangolo. -Consider the following two triangles: +Considera i due triangoli seguenti: ```js const exampleTriangles = [ @@ -19,31 +19,31 @@ const exampleTriangles = [ ]; ``` -It can be verified that first triangle contains the origin, whereas second triangle does not. +Si può verificare che il primo triangolo contiene l'origine, mentre il secondo triangolo no. -Using the `triangles` array containing coordinates of triangles, find the number of triangles for which the interior contains the origin. +Utilizzando l'array `triangles` contenente coordinate di triangoli, trova il numero di triangoli che contengono l'origine al loro interno. # --hints-- -`triangleContainment(exampleTriangles)` should return a number. +`triangleContainment(exampleTriangles)` dovrebbe restituire un numero. ```js assert(typeof triangleContainment(_exampleTriangles) === 'number'); ``` -`triangleContainment(exampleTriangles)` should return `1`. +`triangleContainment(exampleTriangles)` dovrebbe restituire `1`. ```js assert.strictEqual(triangleContainment(_exampleTriangles), 1); ``` -`triangleContainment(testTriangles1)` should return `19`. +`triangleContainment(testTriangles1)` dovrebbe restituire `19`. ```js assert.strictEqual(triangleContainment(_testTriangles1), 19); ``` -`triangleContainment(testTriangles2)` should return `228`. +`triangleContainment(testTriangles2)` dovrebbe restituire `228`. ```js assert.strictEqual(triangleContainment(_testTriangles2), 228); diff --git a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index c7655c26da4..c48f037f76d 100644 --- a/curriculum/challenges/japanese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/japanese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ dashedName: step-24 assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -`th` 要素のテキストは `Total Liabilities` にする必要があります。 +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -`Liabilities` というテキストを `span` 要素で囲む必要があります。 +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -`span` 要素の `class` 属性を `sr-only` に設定する必要があります。 +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -`td` 要素が 3 つ必要です。 +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -1 つ目の `td` 要素には `$750` というテキストが必要です。 +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -2 つ目の `td` 要素には `$600` というテキストが必要です。 +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -3 つ目の `td` 要素には `$475` というテキストが必要です。 +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -3 つ目の `td` 要素の `class` を `current` に設定する必要があります。 +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 94de63af8e7..f9e164d4117 100644 --- a/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/portuguese/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ O quarto `tr` deve ter um elemento `th`. assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -O elemento `th` deve conter o texto `Total Liabilities`. +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -Você deve colocar o texto `Liabilities` dentro de um elemento `span`. +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -O elemento `span` deve ter o atributo `class` com o valor `sr-only`. +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -Você deve ter três elementos `td`. +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -O primeiro elemento `td` deve ter o texto `$750`. +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -O segundo elemento `td` deve ter o texto `$600`. +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -O terceiro elemento `td` deve ter o texto `$475`. +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -O terceiro elemento `td` deve ter o atributo `class` com o valor `current`. +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current')); diff --git a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md index 7f20c4a7bff..1950e4f6371 100644 --- a/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md +++ b/curriculum/challenges/ukrainian/14-responsive-web-design-22/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/61fd990577d8227dd93fbeeb.md @@ -19,49 +19,55 @@ dashedName: step-24 assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')); ``` -Елемент `th` повинен мати текст `Total Liabilities`. +Your text `Total Liabilities` should not include period `.`. + +```js +assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText !== 'Total Liabilities.'); +``` + +Your `th` element should have the text `Total Liabilities`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th')?.innerText === 'Total Liabilities'); ``` -Ви повинні обгорнути текст `Liabilities` в елемент `span`. +You should wrap the text `Liabilities` in a `span` element. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.textContent === 'Liabilities'); ``` -Ваш елемент `span` повинен мати атрибут `class` зі значенням `sr-only`. +Your `span` element should have the `class` attribute set to `sr-only`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelector('th > span')?.classList?.contains('sr-only')); ``` -Ви повинні мати три елементи `td`. +You should have three `td` elements. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td').length === 3); ``` -Ваш перший елемент `td` повинен мати текст `$750`. +Your first `td` element should have the text `$750`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[0]?.textContent === '$750'); ``` -Ваш другий елемент `td` повинен мати текст `$600`. +Your second `td` element should have the text `$600`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[1]?.textContent === '$600'); ``` -Ваш третій елемент `td` повинен мати текст `$475`. +Your third `td` element should have the text `$475`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.textContent === '$475'); ``` -Ваш третій елемент `td` повинен мати `class` зі значенням `current`. +Your third `td` element should have the `class` set to `current`. ```js assert(document.querySelectorAll('table')?.[1]?.querySelector('tbody')?.querySelectorAll('tr')?.[3]?.querySelectorAll('td')?.[2]?.classList?.contains('current'));