diff --git a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index c2dac79b728..68b32a96bdd 100644 --- a/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/arabic/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ Complete the function using the rules below to modify the object passed to the f - Your function must always return the entire `records` object. - If `value` is an empty string, delete the given `prop` property from the album. - If `prop` isn't `tracks` and `value` isn't an empty string, assign the `value` to that album's `prop`. -- If `prop` is `tracks` and value isn't an empty string, add the `value` to the end of the album's `tracks` array. You need to create this array first if the album does not have a `tracks` property. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **Note:** A copy of the `recordCollection` object is used for the tests. You should not directly modify the `recordCollection` object. diff --git a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index 0e24434b6bc..ee3934c0aa6 100644 --- a/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/chinese-traditional/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ dashedName: record-collection - 你的函數必須始終返回整個 `records` 對象。 - 如果 `value` 是空字符串,從專輯裏刪除指定的 `prop`。 - 如果 `prop` 不是 `tracks`,並且 `value` 不是一個空字符串,將 `value` 賦給那個專輯的 `prop`。 -- 如果 `prop` 是 `tracks`,並且值不是一個空字符串,將 `value` 添加到專輯的 `tracks` 數組的末尾。 如果相冊沒有一個 `tracks` 屬性,你需要先創建此數組。 +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **注意:** 將 `recordCollection` 對象的副本用於測試。 你不應該直接修改 `recordCollection` 對象。 diff --git a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index bceb0ae9cba..6ba45ca1780 100644 --- a/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/chinese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ dashedName: record-collection - 你的函数必须始终返回整个 `records` 对象。 - 如果 `value` 是空字符串,从专辑里删除指定的 `prop`。 - 如果 `prop` 不是 `tracks`,并且 `value` 不是一个空字符串,将 `value` 赋给那个专辑的 `prop`。 -- 如果 `prop` 是 `tracks`,并且值不是一个空字符串,将 `value` 添加到专辑的 `tracks` 数组的末尾。 如果相册没有一个 `tracks` 属性,你需要先创建此数组。 +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **注意:** 将 `recordCollection` 对象的副本用于测试。 你不应该直接修改 `recordCollection` 对象。 diff --git a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index 469171a469b..771bc42fe55 100644 --- a/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/espanol/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ Completa la función utilizando las reglas siguientes para modificar el objeto p - Tu función debe devolver siempre el objeto `records` completo. - Si `value` es una cadena vacía, elimina la propiedad `prop` dada del álbum. - Si `prop` no es `tracks` y `value` no es una cadena vacía, asigna el `value` a la `prop` de ese álbum. -- Si `prop` es `tracks` y value no es una cadena vacía, añade el `value` al final del arreglo `tracks` del álbum. Necesitas crear este arreglo primero si el álbum no tiene una propiedad `tracks`. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **Nota:** Para las pruebas se utiliza una copia del objeto `recordCollection`. No debes modificar directamente el objeto `recordCollection`. diff --git a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index f6b661f72a6..4b1b7abbaf3 100644 --- a/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/german/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ Complete the function using the rules below to modify the object passed to the f - Your function must always return the entire `records` object. - If `value` is an empty string, delete the given `prop` property from the album. - If `prop` isn't `tracks` and `value` isn't an empty string, assign the `value` to that album's `prop`. -- If `prop` is `tracks` and value isn't an empty string, add the `value` to the end of the album's `tracks` array. You need to create this array first if the album does not have a `tracks` property. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **Note:** A copy of the `recordCollection` object is used for the tests. You should not directly modify the `recordCollection` object. diff --git a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index a2c68909d06..9596f348059 100644 --- a/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/italian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ Completa la funzione usando le regole sottostanti per modificare l'oggetto passa - La funzione deve sempre restituire l'intero oggetto `records`. - Se `value` è una stringa vuota, elimina la proprietà `prop` dall'album. - Se `prop` non è `tracks` e `value` non è una stringa vuota, assegna `value` alla `prop` di quell'album. -- Se `prop` è `tracks` e il valore non è una stringa vuota, aggiungi `value` alla fine dell'array `tracks`. Devi prima creare questo array se l'album non ha una proprietà `tracks`. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **Nota:** una copia dell'oggetto `recordCollection` viene utilizzata per i test. Non dovresti modificare direttamente l'oggetto `recordCollection`. diff --git a/curriculum/challenges/italian/03-front-end-development-libraries/sass/use-if-and-else-to-add-logic-to-your-styles.md b/curriculum/challenges/italian/03-front-end-development-libraries/sass/use-if-and-else-to-add-logic-to-your-styles.md index e13f9fed81e..bb2371b730a 100644 --- a/curriculum/challenges/italian/03-front-end-development-libraries/sass/use-if-and-else-to-add-logic-to-your-styles.md +++ b/curriculum/challenges/italian/03-front-end-development-libraries/sass/use-if-and-else-to-add-logic-to-your-styles.md @@ -18,7 +18,7 @@ La direttiva `@if` in Sass è utile per valutare un caso specifico - funziona co } ``` -And just like in JavaScript, the `@else if` and `@else` directives test for more conditions: +E proprio come in JavaScript, le direttive `@else if` e `@else` valutano ulteriori condizioni: ```scss @mixin text-effect($val) { @@ -39,7 +39,7 @@ And just like in JavaScript, the `@else if` and `@else` directives test for more # --instructions-- -Crea un mixin chiamato `border-stroke` che prende un parametro `$val`. The mixin should check for the following conditions using `@if`, `@else if`, and `@else` directives: +Crea un mixin chiamato `border-stroke` che prende un parametro `$val`. Il mixin dovrebbe controllare le seguenti condizioni usando le direttive `@if`, `@else if`e `@else`: ```scss light - 1px solid black @@ -47,7 +47,7 @@ medium - 3px solid black heavy - 6px solid black ``` -If the `$val` parameter value is not `light`, `medium`, or `heavy`, then the `border` property should be set to `none`. +Se il valore del parametro `$val` non è `light`, `medium` o `heavy`, allora la proprietà `border` dovrebbe essere impostata su `none`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64061a98f704a014b44afdb2.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64061a98f704a014b44afdb2.md index 190c2ed141e..ace14b3f20e 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64061a98f704a014b44afdb2.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64061a98f704a014b44afdb2.md @@ -7,25 +7,25 @@ dashedName: step-1 # --description-- -In this project, you will be building a number sorter. The HTML and CSS have been provided for you. Feel free to explore them. +In this project, you will be building a number sorter. L'HTML e il CSS ti sono stati forniti. Esplorali liberamente. -When you are ready, declare a `sortButton` variable and assign it the value of `.getElementById()` with the argument `sort`. +Quando sei pronto, dichiara una variabile `sortButton` e assegnale il valore di `.getElementById()` con l'argomento `sort`. # --hints-- -You should declare a `sortButton` variable with `const`. +Dovresti dichiarare una variabile `sortButton` con `const`. ```js assert.match(code, /const\s+sortButton\s*=/); ``` -You should call `document.getElementById()` with the argument `sort`. +Dovresti chiamare `document.getElementById()` con l'argomento `sort`. ```js assert.match(code, /document\.getElementById\(\s*('|"|`)sort\1\s*\)/); ``` -You should assign the value of `document.getElementById()` to `sortButton`. +Dovresti assegnare il valore di `document.getElementById()` a `sortButton`. ```js assert.match(code, /sortButton\s*=\s*document\.getElementById\(\s*('|"|`)sort\1\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64067c1041a80c366b852407.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64067c1041a80c366b852407.md index d50d904feea..ef993cf34ce 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64067c1041a80c366b852407.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/64067c1041a80c366b852407.md @@ -7,35 +7,35 @@ dashedName: step-2 # --description-- -To prepare your project's logic, use `const` and arrow syntax to declare a `sortInputArray` function. It should take a single `event` parameter. +Per preparare la logica del progetto, usa `const` e la sintassi freccia per dichiarare una funzione `sortInputArray`. Dovrebbe prendere un singolo parametro `event`. # --hints-- -You should declare a `sortInputArray` function with `const`. +Dovresti dichiarare una funzione `sortInputArray` con `const`. ```js assert.match(code, /const\s+sortInputArray\s*=/); ``` -Your `sortInputArray` should be a function. +`sortInputArray` dovrebbe essere una funzione. ```js assert.isFunction(sortInputArray); ``` -Your `sortInputArray` should take a single `event` parameter. +`sortInputArray` dovrebbe prendere un singolo parametro `event`. ```js assert.match(code, /const\s+sortInputArray\s*=\s*\(\s*event\s*\)/); ``` -Your `sortInputArray` should use arrow syntax. +`sortInputArray` dovrebbe essere usare la sintassi freccia. ```js assert.match(code, /const\s+sortInputArray\s*=\s*\(\s*event\s*\)\s*=>/); ``` -Your `sortInputArray` function should be empty. +La funzione `sortInputArray` dovrebbe essere vuota. ```js assert.match(sortInputArray.toString(), /\(\s*event\s*\)\s*{\s*}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a71d2b35103a340dba06.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a71d2b35103a340dba06.md index 5cbbf56b6ed..5d5d854bebc 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a71d2b35103a340dba06.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a71d2b35103a340dba06.md @@ -7,11 +7,11 @@ dashedName: step-3 # --description-- -You will be using this as an event listener for the `sortButton`. Because buttons associated with a `form` element submit by default, you need to prevent that behavior. Call `event.preventDefault()` in your function to do this. +Lo userai come event listener per `sortButton`. Dato che gli elementi associati con un elemento `form` vengono inviati di default, devi evitare questo comportamento. A questo scopo, chiama `event.preventDefault()` nella funzione. # --hints-- -Your `sortInputArray` function should call `event.preventDefault()`. +La funzione `sortInputArray` dovrebbe chiamare `event.preventDefault()`. ```js assert.match(sortInputArray.toString(), /event\.preventDefault\(\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a9945fa5d23c225d31cc.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a9945fa5d23c225d31cc.md index aff0f01b51b..54957c90468 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a9945fa5d23c225d31cc.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406a9945fa5d23c225d31cc.md @@ -7,23 +7,23 @@ dashedName: step-4 # --description-- -To test your code as you write it, mount an event listener to your `sortButton` element. It should listen for the `click` event, and take `sortInputArray` as the callback. +Per testare il codice mentre lo scrivi, monta un event listener sull'elemento `sortButton`. Dovrebbe essere in ascolto per l'evento `click` e prendere `sortInputArray` come callback. # --hints-- -You should call the `.addEventListener()` method on your `sortButton` element. +Dovresti chiamare il metodo `.addEventListener()` sull'elemento `sortButton`. ```js assert.match(code, /sortButton\s*\.\s*addEventListener\s*\(/); ``` -Your `.addEventListener()` method should listen for the `click` event. +Il metodo `.addEventListener()` dovrebbe essere in ascolto per l'evento `click`. ```js assert.match(code, /sortButton\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,/); ``` -Your `.addEventListener()` method should take `sortInputArray` as the callback. Remember to pass the function reference, not the function call. +Il metodo `.addEventListener()` dovrebbe prendere `sortInputArray` come callback. Ricorda di passare il riferimento della funzione, non la chiamata della funzione. ```js assert.match(code, /sortButton\s*\.\s*addEventListener\s*\(\s*('|"|`)click\1\s*,\s*sortInputArray\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406adbca6b41d3d7cef85ab.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406adbca6b41d3d7cef85ab.md index 046e6ab37cd..c226de2bb8d 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406adbca6b41d3d7cef85ab.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406adbca6b41d3d7cef85ab.md @@ -7,25 +7,25 @@ dashedName: step-5 # --description-- -Back in your `sortInputArray` function, you need to get the values from your `select` elements. Since they all have the class `values-dropdown`, you can query them all at once. +Tornando alla funzione `sortInputArray`, devi ottenere i valori dagli elementi `select`. Dal momento che hanno tutti la classe `values-dropdown`, puoi ottenerli tutti contemporaneamente. -Use `document.getElementsByClassName()` to get all the elements with the class `values-dropdown`. Assign that to an `inputValues` variable. +Usa `document.getElementsByClassName()` per ottenere tutti gli elementi con la classe `values-dropdown`. Assegnalo a una variabile `inputValues`. # --hints-- -You should use `document.getElementsByClassName()` to get all the elements with the class `values-dropdown`. +Dovresti usare `document.getElementsByClassName()` per ottenere tutti gli elementi con la classe `values-dropdown`. ```js assert.match(sortInputArray.toString(), /document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)/); ``` -You should assign the result of `document.getElementsByClassName()` to a variable named `inputValues`. +Dovresti assegnare il risultato di `document.getElementsByClassName()` a una variabile chiamata `inputValues`. ```js assert.match(sortInputArray.toString(), /inputValues\s*=\s*document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)/); ``` -You should use `const` to declare `inputValues`. +Dovresti usare `const` per dichiarare `inputValues`. ```js assert.match(code, /const\s+inputValues\s*=\s*document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406bb32f9ed593f26c33b2b.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406bb32f9ed593f26c33b2b.md index 8f7df60d313..6b6bc6c944b 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406bb32f9ed593f26c33b2b.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6406bb32f9ed593f26c33b2b.md @@ -7,19 +7,19 @@ dashedName: step-6 # --description-- -Remember that `.getElementsByClassName()` returns an array-like object. You can use the spread operator to convert it into an array. +Ricorda che `.getElementsByClassName()` restituisce un oggetto simil-array. Puoi usare l'operatore spread per convertirlo in un array. -Convert the `document.getElementsByClassName()` call to an array with the spread operator and assign it to a variable called `inputValues`. +Converti la chiamata `document.getElementsByClassName()` in un array con l'operatore spread e assegnala a una variabile chiamata `inputValues`. # --hints-- -You should use the spread operator on `document.getElementsByClassName()`. +Dovresti usare l'operatore spread su `document.getElementsByClassName()`. ```js assert.match(code, /\.\.\.document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)/); ``` -You should wrap the spread operator and `.getElementsByClassName()` in square brackets to create an array. +Dovresti racchiudere l'operatore spread e `.getElementsByClassName()` tra parentesi quadre per creare un array. ```js assert.match(code, /\[\s*\.\.\.document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)\s*\]/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407b940b8983005578d0824.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407b940b8983005578d0824.md index a3e273cd5b4..20d23dffa03 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407b940b8983005578d0824.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407b940b8983005578d0824.md @@ -7,31 +7,31 @@ dashedName: step-7 # --description-- -You need to get the values from your `select` elements. However, these values are strings, and you need them to be numbers. +Devi ottenere i valori dagli elementi `select`. Tuttavia, questi valori sono stringhe e hai bisogno che siano numeri. -Since you have an array, you can use the `map` method to convert each value to a number. Do this by passing a callback function to `map` that takes a `dropdown` parameter and returns `Number(dropdown.value)`. +Dato che hai un array, puoi usare il metodo `map` per convertire ogni valore in un numero. Fallo passando a `map` una funzione callback che prende un parametro `dropdown` e restituisce `Number(dropdown.value)`. # --hints-- -You should chain the `map` method directly on your array. +Dovresti concatenare il metodo `map` direttamente all'array. ```js assert.match(code, /inputValues\s*=\s*\[\s*\.\.\.document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)\s*\]\s*\.map\(/); ``` -Your `map` callback function should use arrow function syntax. +La funzione callback di `map` dovrebbe usare la sintassi delle funzioni freccia. ```js assert.match(code, /inputValues\s*=\s*\[\s*\.\.\.document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)\s*\]\s*\.map\s*\(\s*\(?dropdown?\)?\s*\s*=>/); ``` -Your `map` callback function should take a `dropdown` parameter. +La funzione callback di `map` dovrebbe prendere un parametro `dropdown`. ```js assert.match(code, /inputValues\s*=\s*\[\s*\.\.\.document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)\s*\]\s*\.map\s*\(\s*\(?dropdown\s*\)?\s*=>/); ``` -Your `map` callback function should implicitly return `Number(dropdown.value)`. +La funzione callback di `map` dovrebbe restituire implicitamente `Number(dropdown.value)`. ```js assert.match(code, /inputValues\s*=\s*\[\s*\.\.\.document\.getElementsByClassName\(\s*('|"|`)values-dropdown\1\s*\)\s*\]\s*\.map\s*\(\s*\(?dropdown\s*\)?\s*=>\s*Number\s*\(\s*dropdown\.value\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c303b4272606c019f338.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c303b4272606c019f338.md index 77e77b395f9..d93a5638274 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c303b4272606c019f338.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c303b4272606c019f338.md @@ -7,9 +7,9 @@ dashedName: step-8 # --description-- -You need a function to update the display with the sorted numbers. Start by using arrow syntax to declare an `updateUI` function that takes a single `array` parameter. +Hai bisogno di una funzione per aggiornare il display con i numeri ordinati. Inizia usando la sintassi freccia per dichiarare una funzione `updateUI` che prende un solo parametro `array`. -Because you will be writing algorithms that won't immediately have a return value, set a fallback value for `array` to be an empty array. Here is an example of a function that has a fallback value: +Poiché scriverai algoritmi che non avranno immediatamente un valore di ritorno, imposta un array vuoto come valore di ripiego per `array`. Ecco un esempio di una funzione che ha un valore di ripiego: ```js const myFunction = (string = "") => { @@ -19,37 +19,37 @@ const myFunction = (string = "") => { # --hints-- -You should use `const` to declare an `updateUI` variable. +Dovresti usare `const` per dichiarare una variabile `updateUI`. ```js assert.match(code, /const\s+updateUI\s*=/); ``` -`updateUI` should be a function. +`updateUI` dovrebbe essere una funzione. ```js assert.isFunction(updateUI); ``` -`updateUI` should use arrow syntax. +`updateUI` dovrebbe usare la sintassi freccia. ```js assert.match(code, /const\s+updateUI\s*=\s*\(.*\)\s*=>/); ``` -`updateUI` should take a single `array` parameter. +`updateUI` dovrebbe prendere un singolo parametro `array`. ```js assert.match(code, /const\s+updateUI\s*=\s*\(\s*array/); ``` -`updateUI` should have a fallback value of an empty array for `array`. +`updateUI` dovrebbe avere un array vuoto come valore di ripiego per `array`. ```js assert.match(code, /const\s+updateUI\s*=\s*\(\s*array\s*=\s*\[\s*\]\s*\)/); ``` -`updateUI` should be empty. +`updateUI` dovrebbe essere vuota. ```js assert.match(code, /const\s+updateUI\s*=\s*\(\s*array\s*=\s*\[\s*\]\s*\)\s*=>\s*{\s*}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c4abf5be6d07d8c12ade.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c4abf5be6d07d8c12ade.md index e8163807e50..e30746be4d8 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c4abf5be6d07d8c12ade.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c4abf5be6d07d8c12ade.md @@ -7,31 +7,31 @@ dashedName: step-9 # --description-- -To perform an action on each element in the array, use the method that is meant for iterating over arrays. +Per eseguire un'azione su ogni elemento dell'array, puoi usare un metodo ideato per iterare sugli array. -Use the `forEach()` method, and pass it an empty callback which takes `num` and `i` as the parameters. +Usa il metodo `forEach()` e passagli una callback vuota che prende `num` e `i` come parametri. # --hints-- -You should use the `.forEach()` method to iterate over the `array` parameter. +Dovresti usare il metodo `.forEach()` per iterare sul parametro `array`. ```js assert.match(code, /array\.forEach\(/); ``` -Your `.forEach()` method should take a callback function using arrow syntax. +Il metodo `.forEach()` dovrebbe prendere una funzione callback usando la sintassi freccia. ```js assert.match(code, /array\.forEach\s*\(\s*\(.*\)\s*=>/); ``` -Your callback function should take two parameters, `num` and `i`. +La funzione callback dovrebbe prendere due parametri, `num` e `i`. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>/); ``` -Your callback function should be empty. +La funzione callback dovrebbe essere vuota. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>\s*{\s*}\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c627ddc93708c8dee796.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c627ddc93708c8dee796.md index 2c5d47b2578..593169a4ac1 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c627ddc93708c8dee796.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c627ddc93708c8dee796.md @@ -7,23 +7,23 @@ dashedName: step-10 # --description-- -Create a variable named `outputValueNode` and set its value to the result of calling the `document.getElementById()` method. Use template literal syntax to pass in the `output-value-${i}` string to `.getElementById()`. +Crea una variabile chiamata `outputValueNode` e imposta il suo valore sul risultato della chiamata del metodo `document.getElementById()`. Usa la sintassi del template literal per passare la stringa `output-value-${i}` a `.getElementById()`. # --hints-- -Use `const` to declare an `outputValueNode` variable in your `.forEach()` callback. +Usa `const` per dichiarare una variabile `outputValueNode` nella callback di `.forEach()`. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>\s*\{\s*const\s*outputValueNode\s*=/) ``` -`outputValueNode` should be assigned the value of calling `document.getElementById()`. +A `outputValueNode` dovrebbe essere assegnato il valore della chiamata di `document.getElementById()`. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>\s*\{\s*const\s*outputValueNode\s*=\s*document\.getElementById\s*\(/) ``` -Use template literal syntax to pass in the `output-value-${i}` string to `.getElementById()`. +Usa la sintassi del template literal per passare la stringa `output-value-${i}` a `.getElementById()`. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>\s*\{\s*const\s*outputValueNode\s*=\s*document\.getElementById\s*\(\s*`output-value-\$\{i\}`\s*\)/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6a2c2159309994779a5.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6a2c2159309994779a5.md index 4821ca6d0cb..a1b2673bc86 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6a2c2159309994779a5.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6a2c2159309994779a5.md @@ -7,17 +7,17 @@ dashedName: step-11 # --description-- -Set the `innerText` property of `outputValueNode` to `num`. +Imposta la proprietà `innerText` di `outputValueNode` su `num`. # --hints-- -You should use `innerText` to set the text of `outputValueNode`. +Dovresti usare `innerText` per impostare il testo di `outputValueNode`. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>\s*\{\s*const\s*outputValueNode\s*=\s*document\.getElementById\s*\(\s*`output-value-\$\{i\}`\s*\)\s*;?\s*outputValueNode\.innerText/) ``` -You should use `innerText` to set the text of `outputValueNode` to `num`. +Dovresti usare `innerText` per impostare il testo di `outputValueNode` su `num`. ```js assert.match(code, /array\.forEach\s*\(\s*\(\s*num\s*,\s*i\s*\)\s*=>\s*\{\s*const\s*outputValueNode\s*=\s*document\.getElementById\s*\(\s*`output-value-\$\{i\}`\s*\)\s*;?\s*outputValueNode\.innerText\s*=\s*num;?/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md index e8484393948..544e54879d2 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c6d3f19c4e0a7ba320bb.md @@ -7,19 +7,19 @@ dashedName: step-12 # --description-- -In your `sortInputArray()` function, call your `updateUI()` function and pass `inputValues` as the argument. +Nella funzione `sortInputArray()`, chiama la funzione `updateUI()` e passa `inputValues` come argomento. -You should now be able to click the `Sort` button and see the inputted array in the `Output` section. +Ora dovresti essere in grado di fare clic sul pulsante `Sort` e vedere l'array di input nella sezione `Output`. # --hints-- -You should call `updateUI()` in your `sortInputArray()` function. +Dovresti chiamare la funzione `updateUI()` nella funzione `sortInputArray()`. ```js assert.match(sortInputArray.toString(), /updateUI\(/); ``` -You should pass `inputValues` as an argument to `updateUI()`. +Dovresti passare `inputValues` come argomento a `updateUI()`. ```js assert.match(sortInputArray.toString(), /updateUI\(\s*inputValues\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c722498bc80b76d29073.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c722498bc80b76d29073.md index 5dbf3c2389f..c484888dc6f 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c722498bc80b76d29073.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6407c722498bc80b76d29073.md @@ -7,37 +7,37 @@ dashedName: step-13 # --description-- -Now you need to actually sort the array. The first sorting algorithm you will implement is the bubble sort, which starts at the beginning of the array and 'bubbles up' unsorted values towards the end, iterating through the array until it is completely sorted. +Ora è necessario ordinare effettivamente l'array. Il primo algoritmo di ordinamento che implementerai è il bubble sort, che parte dall'inizio dell'array e sposta i valori non ordinati verso la fine, iterando sull'array fino a quando non è completamente ordinato. -Begin by declaring a `bubbleSort` variable and assigning it an arrow function that takes an `array` parameter. +Inizia dichiarando una variabile `bubbleSort` e assegnandole una funzione freccia che prende un parametro `array`. # --hints-- -You should use `const` to declare a `bubbleSort` variable. +Dovresti usare `const` per dichiarare la variabile `bubbleSort`. ```js assert.match(code, /const\s+bubbleSort\s*=/); ``` -`bubbleSort` should be a function. +`bubbleSort` dovrebbe essere una funzione. ```js assert.isFunction(bubbleSort); ``` -`bubbleSort` should use arrow syntax. +`bubbleSort` dovrebbe usare la sintassi freccia. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(.*\)\s*=>/); ``` -`bubbleSort` should take a single `array` parameter. +`bubbleSort` dovrebbe prendere un singolo parametro `array`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(?\s*array\s*\)?\s*=>/); ``` -`bubbleSort` should be empty. +`bubbleSort` dovrebbe essere vuota. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(?\s*array\s*\)?\s*=>\s*{\s*}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410da6df463a606dfade96f.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410da6df463a606dfade96f.md index c29b8ab41fd..69109ccd70a 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410da6df463a606dfade96f.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410da6df463a606dfade96f.md @@ -7,35 +7,35 @@ dashedName: step-14 # --description-- -You'll need to iterate through the array. For simplicity, use a `for` loop to do so. +Dovrai iterare sull'array. Per semplicità, a questo scopo, usa un loop `for`. # --hints-- -You should use a `for` loop to iterate through the array. +Dovresti usare un loop `for` per iterare sull'array. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(/) ``` -Your `for` loop should initialize `i` to `0`. +Il loop `for` dovrebbe inizializzare `i` a `0`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;/); ``` -Your `for` loop should have a condition that checks the value of `i` is less than the length of the array. +Il loop `for` dovrebbe avere una condizione che verifica se il valore di `i` è minore della lunghezza dell'array. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;/); ``` -Your `for` loop should increment `i` by `1` each time it runs. +Il loop `for` dovrebbe incrementare `i` di `1` a ogni esecuzione. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)/); ``` -Your `for` loop should be empty. +Il loop `for` dovrebbe essere vuoto. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*}\s*}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410dfb965c72108196ef24a.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410dfb965c72108196ef24a.md index 02662b68c30..bf65a21c611 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410dfb965c72108196ef24a.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410dfb965c72108196ef24a.md @@ -7,35 +7,35 @@ dashedName: step-15 # --description-- -Because you need to compare elements, you'll need to use a nested `for` loop. This loop should iterate through every element in the array *except* the last one. Use `j` as your inner loop's iterator variable. +Poiché devi confrontare gli elementi, dovrai utilizzare un loop `for` annidato. Questo loop deve iterare su tutti gli elementi dell'array *eccetto* l'ultimo. Usa `j` come variabile di iterazione del loop interno. # --hints-- -You should have a nested `for` loop. +Dovresti avere un loop `for` annidato. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(/); ``` -Your inner `for` loop should initialize `j` to `0`. +Il loop `for` interno dovrebbe inizializzare `j` a `0`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;/); ``` -Your inner `for` loop should iterate through every element in the array *except* the last one. +Il loop `for` interno dovrebbe iterare su tutti gli elementi dell'array *eccetto* l'ultimo. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)/); ``` -Your inner `for` loop should increment `j` by `1` each time. +Il loop `for` interno dovrebbe incrementare `j` di `1` a ogni esecuzione. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)/); ``` -Your inner `for` loop should be empty. +Il loop `for` interno dovrebbe essere vuoto. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*}\s*}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md index da0a4869be8..997c71dc7ef 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e1b58efc2c091a13bcd9.md @@ -7,29 +7,29 @@ dashedName: step-16 # --description-- -For debugging purposes, add a `console.log()` call in your inner loop. Pass it the arguments `array`, `array[j]`, and `array[j+1]`. +Per poter eseguire il debug, aggiungi una chiamata `console.log()` nel loop interno. Passale gli argomenti `array`, `array[j]` e `array[j+1]`. # --hints-- -You should use a `console.log()` call in your inner loop. +Dovresti usare una chiamata `console.log()` nel loop interno. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\(/); ``` -You should pass `array` as the first argument to `console.log()`. +Dovresti passare `array` come primo argomento a `console.log()`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,/); ``` -You should pass `array[j]` as the second argument to `console.log()`. +Dovresti passare `array[j]` come secondo argomento a `console.log()`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,/); ``` -You should pass `array[j+1]` as the third argument to `console.log()`. +Dovresti passare `array[j+1]` come terzo argomento a `console.log()`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e3c19c21cd09c32dc7c6.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e3c19c21cd09c32dc7c6.md index 5d6ceddfbd7..da48b75e075 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e3c19c21cd09c32dc7c6.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e3c19c21cd09c32dc7c6.md @@ -7,31 +7,31 @@ dashedName: step-17 # --description-- -In your `sortInputArray()` function, declare a `sortedValues` variable. Assign it the value of calling `bubbleSort` with your `inputValues` array. +Nella funzione `sortInputArray()`, dichiara una variabile `sortedValues`. Assegnale il valore della chiamata di `bubbleSort` con l'array `inputValues`. -Then, update your `updateUI` call to take `sortedValues` as the parameter. +Quindi, aggiorna la chiamata di `updateUI` in modo che prenda `sortedValues` come parametro. # --hints-- -You should use `const` to declare a `sortedValues` variable. +Dovresti usare `const` per dichiarare la variabile `sortedValues`. ```js assert.match(code, /const\s+sortedValues\s*=/); ``` -`sortedValues` should be assigned the value of calling `bubbleSort` with your `inputValues` array. +A `sortedValues` dovrebbe essere assegnato il valore della chiamata di `bubbleSort` con l'array `inputValues`. ```js assert.match(code, /const\s+sortedValues\s*=\s*bubbleSort\s*\(\s*inputValues\s*\)/); ``` -`updateUI` should be called with `sortedValues` as the parameter. +`updateUI` dovrebbe essere chiamata con `sortedValues` come parametro. ```js assert.match(code, /updateUI\s*\(\s*sortedValues\s*\)/); ``` -`updateUI` should not be called with `inputValues` as the parameter. +`updateUI` non dovrebbe essere chiamata con `inputValues` come parametro. ```js assert.notMatch(code, /updateUI\s*\(\s*inputValues\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e70c84bb660b4d2a5ea1.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e70c84bb660b4d2a5ea1.md index dd24c24ed82..3a31d468cfe 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e70c84bb660b4d2a5ea1.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410e70c84bb660b4d2a5ea1.md @@ -7,31 +7,31 @@ dashedName: step-18 # --description-- -To achieve the "bubble up" result, you need to check if the current element is larger than the next element. You can do this by accessing the `array` at `j` and `j+1`. +Per ottenere il risultato corretto, devi verificare se l'elemento corrente è più grande dell'elemento successivo. Puoi farlo accedendo ad `array` con `j` e `j+1`. -Create an `if` condition that checks if the current element is larger than the next element. +Crea una condizione `if` che controlla se l'elemento corrente è più grande dell'elemento successivo. # --hints-- -You should not remove your `console.log` statement. +Non dovresti rimuovere l'istruzione `console.log`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?/); ``` -You should use an `if` statement in your nested loop. +Dovresti usare un'istruzione `if` nel loop annidato. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(/); ``` -Your `if` statement should check if the `array[j]` is larger than the `array[j+1]`. +L'istruzione `if` dovrebbe verificare se `array[j]` è maggiore di `array[j+1]`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(\s*array\s*\[\s*j\s*\]\s*>\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)/); ``` -Your `if` statement should be empty. +L'istruzione `if` dovrebbe essere vuota. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(\s*array\s*\[\s*j\s*\]\s*>\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)\s*{\s*}/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410edb33eeaf50dd9a22ab4.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410edb33eeaf50dd9a22ab4.md index 7318c7fd6ef..dcb7e06e16e 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410edb33eeaf50dd9a22ab4.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410edb33eeaf50dd9a22ab4.md @@ -7,31 +7,31 @@ dashedName: step-19 # --description-- -When your `if` condition is true, you need to swap the two elements, "bubbling" the larger element up toward the end of the array. +Quando la condizione di `if` è vera, devi scambiare i due elementi, spostando l'elemento più grande verso la fine dell'array. -To do this, declare a `temp` variable and assign it the value of `array[j]`. Then assign `array[j]` the value of `array[j + 1]`. Finally, assign `array[j + 1]` the value of `temp`. +Per farlo, dichiara una variabile `temp` e assegnale il valore di `array[j]`. Quindi assegna a `array[j]` il valore di `array[j + 1]`. Infine, assegna a `array[j + 1]` il valore di `temp`. # --hints-- -Within your `if` statement, you should declare a `temp` variable. +All'interno dell'istruzione `if` dovresti dichiarare una variabile `temp`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(\s*array\s*\[\s*j\s*\]\s*>\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)\s*{\s*const\s*temp\s*=/); ``` -You should assign `temp` the value of `array[j]`. +Dovresti assegnare a `temp` il valore di `array[j]`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(\s*array\s*\[\s*j\s*\]\s*>\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)\s*{\s*const\s*temp\s*=\s*array\s*\[\s*j\s*\];?\s*array\s*\[\s*j\s*\]\s*=\s*array\s*\[\s*j\s*\+\s*1\s*\];?\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*=\s*temp\s*;?/); ``` -You should assign `array[j]` the value of `array[j + 1]`. +Dovresti assegnare a `array[j]` il valore di `array[j + 1]`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(\s*array\s*\[\s*j\s*\]\s*>\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)\s*{\s*const\s*temp\s*=\s*array\s*\[\s*j\s*\];?\s*array\s*\[\s*j\s*\]\s*=\s*array\s*\[\s*j\s*\+\s*1\s*\];?/); ``` -You should assign `array[j + 1]` the value of `temp`. +Dovresti assegnare a `array[j + 1]` il valore di `temp`. ```js assert.match(code, /const\s+bubbleSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*for\s*\(\s*let\s+j\s*=\s*0\s*;\s*j\s*<\s*array\.length\s*-\s*1\s*;\s*j\s*\+\+\s*\)\s*{\s*console\.log\s*\(\s*array\s*,\s*array\s*\[\s*j\s*\]\s*,\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\);?\s*if\s*\(\s*array\s*\[\s*j\s*\]\s*>\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*\)\s*{\s*const\s*temp\s*=\s*array\s*\[\s*j\s*\];?\s*array\s*\[\s*j\s*\]\s*=\s*array\s*\[\s*j\s*\+\s*1\s*\];?\s*array\s*\[\s*j\s*\+\s*1\s*\]\s*=\s*temp\s*;?/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410efff0ae97c0f06856511.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410efff0ae97c0f06856511.md index 4d3522a57e9..7a45594374f 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410efff0ae97c0f06856511.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410efff0ae97c0f06856511.md @@ -7,7 +7,7 @@ dashedName: step-20 # --description-- -Finally, after your outer loop has finished executing, return the sorted array. +Infine, una volta terminata l'esecuzione del loop interno, restituisci l'array ordinato. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fb3b68429716a810ea4b.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fb3b68429716a810ea4b.md index 9d0f2ed1b78..92ca3673f79 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fb3b68429716a810ea4b.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-basic-algorithmic-thinking-by-building-a-number-sorter/6410fb3b68429716a810ea4b.md @@ -7,31 +7,31 @@ dashedName: step-25 # --description-- -A selection sort relies on tracking the index of the smallest value in the array. Declare a variable `minIndex` and set it to `i` - this ensures that if your current value is the smallest, it will be swapped with itself and not be moved. You will need to be able to reassign the value of `minIndex` as you iterate through the array. +Selection sort si basa sul tracciamento dell'indice del valore più piccolo nell'array. Dichiara una variabile `minIndex` e impostala su `i` - questo assicura che se il valore attuale è il più piccolo, sarà scambiato con sé stesso e non sarà spostato. Dovrai essere in grado di riassegnare il valore di `minIndex` mentre iteri sull'array. -Then, write another `for` loop, using `j` as the iterator. This loop needs to start at the index after `i` and iterate through the rest of the array. +Poi, scrivi un altro loop `for` usando `j` come iteratore. Questo loop deve iniziare dall'indice dopo `i` e iterare sul resto dell'array. # --hints-- -You should use `let` to declare `minIndex`. +Dovresti usare `let` per dichiarare `minIndex`. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=/) ``` -You should set `minIndex` to `i`. +Dovresti impostare `minIndex` su `i`. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?/) ``` -You should have a nested `for` loop. +Dovresti avere un loop `for` annidato. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?\s*for\s*\(/) ``` -Your `for` loop should initialize `j` to `i + 1`. +Il loop `for` dovrebbe inizializzare `j` a `i + 1`. ```js assert.match(code, /const\s+selectionSort\s*=\s*\(\s*array\s*\)\s*=>\s*{\s*for\s*\(\s*let\s+i\s*=\s*0\s*;\s*i\s*<\s*array\.length\s*;\s*i\s*\+\+\s*\)\s*{\s*let\s*minIndex\s*=\s*i\s*;?\s*for\s*\(\s*let\s+j\s*=\s*i\s*\+\s*1\s*;/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5230bccd1c2f5c13e1ce.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5230bccd1c2f5c13e1ce.md index 87d957cfa63..6927b1f5e3c 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5230bccd1c2f5c13e1ce.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63bf5230bccd1c2f5c13e1ce.md @@ -25,7 +25,7 @@ assert.isDefined(isInvalidInput) assert.isFunction(isInvalidInput) ``` -`isInvalidInput` dovrebbe accettre un singolo parametro `str`. +`isInvalidInput` dovrebbe accettare un singolo parametro `str`. ```js assert.match(isInvalidInput?.toString(), /\(\s*str\s*\)/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e94dae6dcedbad73f2f6ee.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e94dae6dcedbad73f2f6ee.md index 10556005822..bc01788d2e4 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e94dae6dcedbad73f2f6ee.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e94dae6dcedbad73f2f6ee.md @@ -7,9 +7,9 @@ dashedName: step-27 # --description-- -`arr` contains a series of objects that each contain a `name`, `position`, `number`, `isCaptain` and `nickname` property. In order to access each of those properties inside the callback function, you will need to use object destructuring to unpack them into variables. +`arr` contiene una serie di oggetti, ognuno con delle proprietà `name`, `position`, `number`, `isCaptain` e `nickname`. Per accedere a ognuna di queste proprietà nella funzione callback, dovrai usare la destrutturazione degli oggetti estraendole in variabili. -Here is an example: +Ecco un esempio: ```js function myExampleFunction({ name, age, job, city }) { @@ -17,11 +17,11 @@ function myExampleFunction({ name, age, job, city }) { } ``` -Inside the parameter list in the callback function for the `map` method, unpack all 5 object properties from objects in `arr` using object destructuring. +All'interno della lista dei parametri nella funzione callback del metodo `map`, estrai tutte le 5 proprietà dagli oggetti in `arr` usando la destrutturazione degli oggetti. # --hints-- -You should unpack all 5 object properties from objects in `arr` using object destructuring. +Dovresti estrarre tutte le 5 proprietà dagli oggetti in `arr` usando la destrutturazione degli oggetti. ```js diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e954321b0a77ae4f6d9650.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e954321b0a77ae4f6d9650.md index 564fb6bb8e0..153e35046f9 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e954321b0a77ae4f6d9650.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e954321b0a77ae4f6d9650.md @@ -7,13 +7,13 @@ dashedName: step-28 # --description-- -Inside the body of the callback function, you will need to add template literals ` `` ` which will contain the HTML content for the player cards. +All'interno del corpo della funzione callback, dovrai aggiungere i template literal ` `` ` che accoglieranno il contenuto HTML per le figurine. -Inside the template literals, add an empty `div` with a class of `player-card`. +All'interno dei template literal, aggiungi un `div` vuoto con la classe `player-card`. # --hints-- -You should use template literals to add an empty `div` with a class of `player-card`. +Dovresti usare i template literal per aggiungere un `div` vuoto con la classe `player-card`. ```js diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95a45dce95baf41dd4f78.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95a45dce95baf41dd4f78.md index b9c104fb55a..acb82b26d3e 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95a45dce95baf41dd4f78.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95a45dce95baf41dd4f78.md @@ -7,7 +7,7 @@ dashedName: step-29 # --description-- -Inside the `div`, add an `h2` element which contains the `name` parameter. Since you are working with template literals, you will need to use an embedded expression for the `name` parameter: +All'interno del `div`, aggiungi un elemento `h2` che contiene il parametro `name`. Dal momento che stai lavorando con i template literal, dovrai usare un'espressione incorporata per il parametro `name`: ```js ${expression goes here} @@ -15,13 +15,13 @@ ${expression goes here} # --hints-- -You should add an `h2` element with the `name` parameter. +Dovresti aggiungere un elemento `h2` con il parametro `name`. ```js assert.match(code, /\s*\s*\${\s*name\s*}\s*<\/h2>\s*/) ``` -Your `h2` should be nested in your `div`. +L'elemento `h2` dovrebbe essere annidato nel `div`. ```js assert.match(code, /`\s*\s*\s*\${\s*name\s*}\s*<\/h2>\s*<\/div>\s*`\s*/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95e39860dc5b01ebe9be0.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95e39860dc5b01ebe9be0.md index 53646c4fff0..d175c40bd61 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95e39860dc5b01ebe9be0.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e95e39860dc5b01ebe9be0.md @@ -7,13 +7,13 @@ dashedName: step-30 # --description-- -The next step would be to display the word `(Captain)` next to the player if they are listed as a captain for the team. +Il prossimo passo è mostrare la parola `(Captain)` accanto al giocatore se è indicato come capitano della squadra. -Right next to the `${name}` expression, add a new embedded expression. Inside that expression, use a ternary operator to check if `isCaptain` is true. If so, return `(Captain)` otherwise return an empty string. +Proprio accanto all'espressione `${name}`, aggiungi una nuova espressione incorporata. All'interno di quell'espressione, usa un operatore ternario per controllare se `isCaptain` è vero. In caso affermativo, restituisci `(Captain)`, altrimenti restituisci una stringa vuota. # --hints-- -You should use a ternary operator to check if `isCaptain` is true and return `(Captain)` or return an empty string. +Dovresti usare un operatore ternario per verificare se `isCaptain` è vero e restituire `(Captain)` o restituire una stringa vuota. ```js assert.match(code, /\s*\s*\${\s*name\s*}\s*\$\{isCaptain\s*\?\s*('|"|`)\(Captain\)\1\s*:\s*('|"|`)\2\}\s*<\/h2>\s*/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9667c881b61b1e338d276.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9667c881b61b1e338d276.md index f41577b8e76..a5d986f6cc2 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9667c881b61b1e338d276.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9667c881b61b1e338d276.md @@ -7,17 +7,17 @@ dashedName: step-31 # --description-- -Below the `h2` element, add a paragraph element with the text `Position:` and an embedded expression that contains the `position` parameter. +Sotto l'elemento `h2`, aggiungi un elemento paragrafo con il testo `Position:` e un'espressione incorporata che contiene il parametro `position`. # --hints-- -You should add a new paragraph element with the text `Position:` followed by the `position` variable. +Dovresti aggiungere un nuovo elemento paragrafo con il testo `Position:` seguito dalla variabile `position`. ```js assert.match(code, /\s*\s*Position:\s*\${\s*position\s*}\s*<\/p>\s*/) ``` -Your new `p` element should come after the `h2` element. +Il nuovo elemento `p` dovrebbe trovarsi dopo l'elemento `h2`. ```js assert.match(code, /<\/h2>\s*\s*Position:\s*\${\s*position\s*}\s*<\/p>\s*/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96938d2a347b2734a1587.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96938d2a347b2734a1587.md index edceac6fe11..c28a41cabaa 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96938d2a347b2734a1587.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96938d2a347b2734a1587.md @@ -7,17 +7,17 @@ dashedName: step-32 # --description-- -Below the paragraph element, add another paragraph element with the text `Number:` and an embedded expression that contains the `number` parameter. +Sotto l'elemento paragrafo, aggiungi un altro elemento paragrafo con il testo `Number:` e un'espressione incorporata che contiene il parametro `number`. # --hints-- -You should add a new paragraph element with the text `Number:` followed by the `number` variable. +Dovresti aggiungere un nuovo elemento paragrafo con il testo `Number:` seguito dalla variabile `number`. ```js assert.match(code, /\s*\s*Number:\s*\${\s*number\s*}\s*<\/p>\s*/) ``` -Your new `p` element should come after your existing `p` element. +Il nuovo elemento `p` dovrebbe trovarsi dopo l'elemento `p` esistente. ```js assert.match(code, /<\/h2>\s*\s*Position:\s*\${\s*position\s*}\s*<\/p>\s*\s*Number:\s*\${\s*number\s*}\s*<\/p>\s*/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96eb94c97b6b31ee50f63.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96eb94c97b6b31ee50f63.md index 4bb4a4f5aa6..8aecc7d7f2b 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96eb94c97b6b31ee50f63.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e96eb94c97b6b31ee50f63.md @@ -7,17 +7,17 @@ dashedName: step-33 # --description-- -Below your existing paragraph elements, add another paragraph element with the text `Nickname:`. +Sotto gli elementi paragrafo esistenti, aggiungi un altro elemento paragrafo con il testo `Nickname:`. # --hints-- -You should add a new paragraph element with the text `Nickname:`. +Dovresti aggiungere un nuovo elemento paragrafo con il testo `Nickname:`. ```js assert.match(code, /\s*\s*Nickname:\s*<\/p>\s*/) ``` -Your new `p` element should come after the `h2` element. +Il nuovo elemento `p` dovrebbe trovarsi dopo l'elemento `h2`. ```js assert.match(code, /<\/h2>\s*\s*Position:\s*\${\s*position\s*}\s*<\/p>\s*\s*Number:\s*\${\s*number\s*}\s*<\/p>\s*\s*Nickname:\s*<\/p>\s*/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9718d7d490bb3940d5a0a.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9718d7d490bb3940d5a0a.md index 46379d93380..c9681386a3d 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9718d7d490bb3940d5a0a.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9718d7d490bb3940d5a0a.md @@ -7,13 +7,13 @@ dashedName: step-34 # --description-- -Next to the `Nickname:` text, add an embedded expression that will show the player's nickname if they have one. +Accanto al testo `Nickname:`, aggiungi un'espressione incorporata che mostrerà il soprannome del giocatore, se ne ha uno. -Use a ternary operator to check if `nickname` is not `null`. If the player has a nickname, display `nickname` otherwise display `"N/A"`. +Usa un operatore ternario per controllare se `nickname` non è `null`. Se il giocatore ha un soprannome, mostra `nickname` altrimenti mostra `"N/A"`. # --hints-- -You should use a ternary operator to check if `nickname` is not `null`. +Dovresti usare un operatore ternario per controllare se `nickname` non è `null`. ```js assert.match(code, /\s*\s*Nickname:\s*\$\{\s*nickname\s*!==\s*null\s*\?/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md index b4b4d23626a..2c3c49967f7 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e9737f686c76b4078a60f4.md @@ -7,20 +7,20 @@ dashedName: step-35 # --description-- -The `.map()` method will return a new array of `player-card` items separated by commas. +Il metodo `.map()` restituirà un nuovo array di elementi `player-card` separati da virgole. -To remove the commas between each `player-card` so it does not show up on screen, chain the `.join()` method to the `.map()` method. Pass an empty string as the argument for the `.join()` method. +Per rimuovere le virgole tra ogni `player-card` in modo che non si vedano sullo schermo, concatena il metodo `.join()` al metodo `.map()`. Passa una stringa vuota come argomento per il metodo `.join()`. # --hints-- -You should chain the `.join()` method to the `.map()` method. +Dovresti concatenare il metodo `.join()` al metodo `.map()`. ```js assert.match(code, /arr\s*\.map\(.*\)\s*\.join\(/s); ``` -You should pass an empty string to the `.join()` method. +Dovresti passare una stringa vuota al metodo `.join()`. ```js assert.match(code, /arr\s*\.map\(.*\)\s*\.join\(\s*('|"|`)\1\s*\)/s); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28972973504e7bb58b0b3.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28972973504e7bb58b0b3.md index e5c273332f2..d1868289497 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28972973504e7bb58b0b3.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28972973504e7bb58b0b3.md @@ -7,25 +7,25 @@ dashedName: step-36 # --description-- -The next step is to create a function that will detect when a user makes a selection from the `playersDropdownList`. +Il prossimo passo è creare una funzione che rilevi quando un utente seleziona qualcosa da `playersDropdownList`. -Use the `.addEventListener()` method on `playersDropdownList`. Inside the event listener, pass in a `change` event type and an empty callback function. +Usa il metodo `.addEventListener()` su `playersDropdownList`. All'interno dell'event listener, passa il tipo di evento `change` e una funzione callback vuota. # --hints-- -You should call the `.addEventListener()` method on the `playersDropdownList` variable. +Dovresti chiamare il metodo `.addEventListener()` sulla variabile `playersDropdownList`. ```js assert.match(code, /playersDropdownList\.addEventListener\(/); ``` -Your event listener should listen for the `change` event. +L'event listener dovrebbe essere in ascolto per l'evento `change`. ```js assert.match(code, /playersDropdownList\.addEventListener\(\s*('|"|`)change\1/); ``` -Your event listener should have an empty callback function. +L'event listener dovrebbe avere una funzione callback vuota. ```js assert.match(code, /playersDropdownList\.addEventListener\(\s*('|"|`)change\1\s*,\s*\(\s*\)\s*=>\s*\{\s*\}\s*\)/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md index 8aeee3d3efa..c38269cd507 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f28ef082d771e8bf71f94a.md @@ -7,13 +7,13 @@ dashedName: step-37 # --description-- -For the callback function, pass in `e` as a parameter. +Per la funzione callback, passa `e` come parametro. -`e` represents an object which contains the information for that event. +`e` rappresenta un oggetto che contiene le informazioni per l'evento. # --hints-- -You should pass in `e` as a parameter to your callback function. +Dovresti passare `e` come parametro alla funzione callback. ```js assert.match(code, /playersDropdownList\.addEventListener\(\s*('|"|`)change\1\s*,\s*\(\s*e\s*\)\s*=>\s*\{\s*\}\s*\)/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md index f8bad487511..de4d949bd05 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md @@ -7,15 +7,15 @@ dashedName: step-38 # --description-- -Inside the callback function, add a `console.log` with the value of `e.target.value`. +All'interno della funzione callback, aggiungi un `console.log` con il valore `e.target.value`. -Open the console, and make a selection from the teammates dropdown menu. You should see the value of that selection in the console. +Apri la console e fai una selezione dal menu a discesa dei giocatori. Dovresti vedere il valore selezionato nella console. -`e.target.value` represents the value property from the `playersDropdownList` element. In future steps, you will use this value to show player cards based on the position they play. +`e.target.value` rappresenta la proprietà value dell'elemento `playersDropdownList`. Nei prossimi step userai questo valore per mostrare le figurine dei giocatori in base al ruolo in cui giocano. # --hints-- -You should add a `console.log` with the value of `e.target.value`. +Dovresti aggiungere un `console.log` con il valore `e.target.value`. ```js assert.match(code, /console.log\s*\(e.target.value\)\s*/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md index a15fd647b37..11e6b6a4403 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md @@ -7,27 +7,27 @@ dashedName: step-39 # --description-- -Remove the `console.log` statement you created in the previous step. +Rimuovi la dichiarazione `console.log` che hai creato nel passaggio precedente. -The next step would be to reset the content for the `playerCards` element. +Il prossimo passo è resettare il contenuto dell'elemento `playerCards`. -Inside the callback function, access the `innerHTML` property of the `playerCards` element and assign it a value of an empty string. +All'interno della funzione callback, accedi alla proprietà `innerHTML` dell'elemento `playerCards` e assegnagli il valore di una stringa vuota. # --hints-- -You should not have the `console.log` statement in your code. +Non dovresti avere l'istruzione `console.log` nel tuo codice. ```js assert.notMatch(code, /\s*console.log\(e.target.value\)/); ``` -You should access the `innerHTML` property of the `playerCards` element. +Dovresti accedere alla proprietà `innerHTML` dell'elemento `playerCards`. ```js assert.match(code, /playerCards\.innerHTML\s*=/); ``` -You should set the `innerHTML` property to an empty string. +Dovresti impostare la proprietà `innerHTML` su una stringa vuota. ```js assert.match(code, /\s*playerCards.innerHTML\s*=\s*('|"|`)\1/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md index 1657ba65473..cf9e06a750b 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29ce62aea65eb041758c8.md @@ -7,11 +7,11 @@ dashedName: step-40 # --description-- -The next step would be to add a `switch` statement which will check for the user's selection from the player dropdown menu and filter out cards based on the player's positions. +Il prossimo passo è aggiungere un'istruzione `switch` che controllerà la selezione dell'utente dal menu a discesa dei giocatori e filtrerà le figurine in base al ruolo del giocatore. -A `switch` statement is a control-flow statement that tests the value of an expression against multiple `case` clauses, and can include an optional `default` clause. +Un'istruzione `switch` è una struttura di controllo che verifica il valore di un'espressione rispetto a più clausole `case` e può includere una clausola `default` opzionale. -This is the basic syntax for a `switch` statement: +Questa è la sintassi di base di un'istruzione `switch`: ```js switch (expression) { @@ -29,17 +29,17 @@ switch (expression) { } ``` -Add a `switch` statement and use `e.target.value` for the expression. +Aggiungi un'istruzione `switch` e usa `e.target.value` come espressione. # --hints-- -You should use a `switch` statement. +Dovresti usare un'istruzione `switch`. ```js assert.match(code, /switch/); ``` -Your `switch` statement should use `e.target.value` for the expression. +L'istruzione `switch` dovrebbe usare `e.target.value` come espressione. ```js assert.match(code, /switch\s*\(\s*e\.target\.value\s*\)/); diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a0a860790eebe61bf908.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a0a860790eebe61bf908.md index 9188483c345..1fe17a58e31 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a0a860790eebe61bf908.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a0a860790eebe61bf908.md @@ -7,9 +7,9 @@ dashedName: step-41 # --description-- -If the user selects `Nicknames` from the dropdown menu you will want to filter out player cards that have a nickname. +Se l'utente seleziona `Nicknames` dal menu a discesa, desideri filtrare le figurine dei giocatori che hanno un soprannome. -Start by adding a `case` clause for `nickname` inside your `switch` statement. +Inizia aggiungendo una clausola `case` per `nickname` nell'istruzione `switch`. # --hints-- diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md index cabfe408ca5..b3466436ee0 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a4a8087e6dec8ec47f16.md @@ -7,53 +7,53 @@ dashedName: step-44 # --description-- -Next, add a `case` clause for `forward`. +Ora aggiungi una clausola `case` per `forward`. -Inside that `case`, call the `setPlayerCards` function with an argument of `players.filter()`. +All'interno di questa clausola `case`, chiama la funzione `setPlayerCards` con l'argomento `players.filter()`. -Inside the `filter()` method, add a callback function with a parameter of `player` that will check if `player.position` equals `forward`. +All'interno del metodo `filter()` aggiungi una funzione callback con un parametro `player` che verifica se `player.position` è uguale a `forward`. -Lastly, add a `break` statement below the `setPlayerCards` function call. +Infine aggiungi un'istruzione `break` sotto la chiamata della funzione `setPlayerCards`. # --hints-- -You should add a new `case` for `forward` inside your `switch` statement. +Dovresti aggiungere una nuova clausola `case` per `forward` nell'istruzione `switch`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*/) ``` -In your `forward` `case`, you should call the `setPlayerCards` function. +Nel `case` di `forward`, dovresti chiamare la funzione `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Dovresti passare `players.filter()` alla chiamata di `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) ``` -You should pass an arrow callback function to your `players.filter()` call. +Dovresti passare una funzione callback freccia alla chiamata `players.filter()`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?.*\)?\s*=>/); ``` -Your `filter()` callback should take a `player` parameter. +La callback di `filter()` dovrebbe prendere un parametro `player`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>/) ``` -Your `filter()` callback should implicitly return the result of checking if `player.position` is `forward`. +La callback di `filter()` dovrebbe restituire implicitamente se `player.position` è `forward`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)forward\2\s*\)/) ``` -You will need to add a `break` statement below your `setPlayerCards` call. +Devi aggiungere un'istruzione `break` sotto la chiamata di `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*forward\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)forward\2\s*\)\s*\);?\s*break/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md index fbf9f1cb1b8..aaf31a28b9f 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a5f09a785aed155c0a56.md @@ -7,47 +7,47 @@ dashedName: step-45 # --description-- -Add a new `case` for `midfielder` that checks if `player.position` equals `midfielder` following the same pattern from the previous step. +Aggiungi un nuovo `case` per `midfielder` che verifica se `player.position` è uguale a `midfielder` seguito dallo stesso modello dello step precedente. # --hints-- -You should add a new `case` for `midfielder` inside your `switch` statement. +Dovresti aggiungere una nuova clausola `case` per `midfielder` nell'istruzione `switch`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*/) ``` -In your `midfielder` `case`, you should call the `setPlayerCards` function. +Nel `case` di `midfielder`, dovresti chiamare la funzione `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Dovresti passare `players.filter()` alla chiamata `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) ``` -You should pass an arrow callback function to your `players.filter()` call. +Dovresti passare una funzione callback freccia alla chiamata `players.filter()`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?.*\)?\s*=>/); ``` -Your `filter()` callback should take a `player` parameter. +La callback di `filter()` dovrebbe prendere un parametro `player`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>/) ``` -Your `filter()` callback should implicitly return the result of checking if `player.position` is `midfielder`. +La callback di `filter()` dovrebbe restituire implicitamente se `player.position` è `midfielder`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)midfielder\2\s*\)/) ``` -You will need to add a `break` statement below your `setPlayerCards` call. +Devi aggiungere un'istruzione `break` sotto la chiamata di `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*midfielder\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)midfielder\2\s*\)\s*\);?\s*break/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md index 8666f5ab42e..d96f9d3f924 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2a8e14fb388edd3242527.md @@ -7,47 +7,47 @@ dashedName: step-46 # --description-- -Add a new `case` for `defender` that checks if `player.position` equals `defender` following the same pattern as the previous step. +Aggiungi un nuovo `case` per `defender` che verifica se `player.position` è uguale a `defender` seguito dallo stesso modello dello step precedente. # --hints-- -You should add a new `case` for `defender` inside your `switch` statement. +Dovresti aggiungere una nuova clausola `case` per `defender` nell'istruzione `switch`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*/) ``` -In your `defender` `case`, you should call the `setPlayerCards` function. +Nel `case` di `defender`, dovresti chiamare la funzione `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Dovresti passare `players.filter()` alla chiamata `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) ``` -You should pass an arrow callback function to your `players.filter()` call. +Dovresti passare una funzione callback freccia alla chiamata `players.filter()`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?.*\)?\s*=>/); ``` -Your `filter()` callback should take a `player` parameter. +La callback di `filter()` dovrebbe prendere un parametro `player`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>/) ``` -Your `filter()` callback should implicitly return the result of checking if `player.position` is `defender`. +La callback di `filter()` dovrebbe restituire implicitamente se `player.position` è `defender`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)defender\2\s*\)/) ``` -You will need to add a `break` statement below your `setPlayerCards` call. +Devi aggiungere un'istruzione `break` sotto la chiamata di `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*defender\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)defender\2\s*\)\s*\);?\s*break/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md index c41768c86d6..7069280b5c7 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2aa36fcdc63ee4e18fc37.md @@ -7,47 +7,47 @@ dashedName: step-47 # --description-- -Add a new `case` for `goalkeeper` that checks if `player.position` equals `goalkeeper` following the same pattern as the previous step. +Aggiungi un nuovo `case` per `goalkeeper` che verifica se `player.position` è uguale a `goalkeeper` seguito dallo stesso modello dello step precedente. # --hints-- -You should add a new `case` for `goalkeeper` inside your `switch` statement. +Dovresti aggiungere una nuova clausola `case` per `goalkeeper` nell'istruzione `switch`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*/) ``` -In your `goalkeeper` `case`, you should call the `setPlayerCards` function. +Nel `case` di `goalkeeper`, dovresti chiamare la funzione `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Dovresti passare `players.filter()` alla chiamata `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) ``` -You should pass an arrow callback function to your `players.filter()` call. +Dovresti passare una funzione callback freccia alla chiamata `players.filter()`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?.*\)?\s*=>/); ``` -Your `filter()` callback should take a `player` parameter. +La callback di `filter()` dovrebbe prendere un parametro `player`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>/) ``` -Your `filter()` callback should implicitly return the result of checking if `player.position` is `goalkeeper`. +La callback di `filter()` dovrebbe restituire implicitamente se `player.position` è `goalkeeper`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)goalkeeper\2\s*\)/) ``` -You will need to add a `break` statement below your `setPlayerCards` call. +Devi aggiungere un'istruzione `break` sotto la chiamata di `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*goalkeeper\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.position\s*===?\s*('|"|`)goalkeeper\2\s*\)\s*\);?\s*break/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2ab4f6c52c5eec6d68de4.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2ab4f6c52c5eec6d68de4.md index 6c919ef5e37..69511c3e243 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2ab4f6c52c5eec6d68de4.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f2ab4f6c52c5eec6d68de4.md @@ -7,23 +7,23 @@ dashedName: step-48 # --description-- -The final step is to add a `default` clause if none of the other `case` clauses match the user selection. +Lo step finale è aggiungere una clausola `default` se nessuna delle altre clausole `case` corrisponde alla selezione dell'utente. -For the `default` clause, call the `setPlayerCards` function without any arguments passed in. +Per la clausola `default`, chiama la funzione `setPlayerCards` senza passare alcun argomento. -Test out your dropdown menu, and you should see the player cards be filtered out by position or nickname. +Prova il menu a discesa: dovresti vedere le figurine dei giocatori filtrate per ruolo o soprannome. -Congratulations on completing the football team cards project! +Congratulazioni, hai completato il progetto delle figurine dei calciatori! # --hints-- -You should add a `default` clause to your `switch` statement. +Dovresti aggiungere una clausola `default` all'istruzione `switch`. ```js assert.match(code, /default\s*:\s*/) ``` -In your `default` clause, you should call the `setPlayerCards` function without any arguments passed in. +Nella clausola `default`, dovresti chiamare la funzione `setPlayerCards` senza passare alcun argomento. ```js assert.match(code, /default\s*:\s*setPlayerCards\(\s*\)/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md index 03ddbef793f..7dcc600f819 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fc88d8fa7127f76e0324f.md @@ -8,9 +8,9 @@ dashedName: step-42 # --description-- -Call the `setPlayerCards` function with an argument of `players.filter()`. +Chiama la funzione `setPlayerCards` con l'argomento `players.filter()`. -Inside the `filter` method, add a callback function with a parameter called `player` and implicitly return `player.nickname` is not `null`. +All'interno del metodo `filter`, aggiungi una funzione callback con un parametro chiamato `player` e restituisci implicitamente `player.nickname` se non è `null`. # --hints-- @@ -20,19 +20,19 @@ In your `nickname` case, you should call the `setPlayerCards` function. assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(/) ``` -You should pass `players.filter()` to your `setPlayerCards` call. +Dovresti passare `players.filter()` alla chiamata `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(/) ``` -You should pass an arrow callback function to your `players.filter()` call. +Dovresti passare una funzione callback freccia alla chiamata `players.filter()`. ```js assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?.*\)?\s*=>/); ``` -Your `filter()` callback should take a `player` parameter. +La callback di `filter()` dovrebbe prendere un parametro `player`. ```js assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>/) diff --git a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md index e084de31fa4..93323b1fa06 100644 --- a/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md +++ b/curriculum/challenges/italian/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/641fcfd468185384ac218b7d.md @@ -15,13 +15,13 @@ Before you can move onto the next case, you will need to add a `break` statement break; ``` -The `break` statement breaks out of the `switch` statement early, usually after executing some code after a `case` clause matches the expression. If a `break` statement is not present, execution will continue through the rest of the causes in the `switch` statement. +L'istruzione `break` causa l'uscita dall'istruzione `switch` in anticipo, di solito in seguito all'esecuzione del codice della clausola `case` corrispondente all'espressione. Se non è presente un'istruzione `break`, l'esecuzione continuerà per tutte le altre clausole nell'istruzione `switch`. -Below your `setPlayerCards` call, add a `break` statement. +Sotto la chiamata `setPlayerCards`, aggiungi una dichiarazione `break`. # --hints-- -You will need to add a `break` statement below your `setPlayerCards` call. +Devi aggiungere un'istruzione `break` sotto la chiamata di `setPlayerCards`. ```js assert.match(code, /\s*case\s*('|"|`)\s*nickname\s*\1\s*:\s*setPlayerCards\(\s*players\.filter\(\s*\(?\s*player\s*\)?\s*=>\s*player\.nickname\s*!==\s*null\s*\)\s*\);?\s*break/) diff --git a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index 03f2d9c2199..0005eea2546 100644 --- a/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/japanese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ The `updateRecords` function takes 4 arguments represented by the following func - Your function must always return the entire `records` object. - `value` が空文字列の場合は、指定された `prop` プロパティをアルバムから削除します。 - If `prop` isn't `tracks` and `value` isn't an empty string, assign the `value` to that album's `prop`. -- If `prop` is `tracks` and value isn't an empty string, add the `value` to the end of the album's `tracks` array. You need to create this array first if the album does not have a `tracks` property. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **注:** テストには `recordCollection` オブジェクトのコピーが使用されます。 You should not directly modify the `recordCollection` object. diff --git a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index 7802442e7e9..0bff161020a 100644 --- a/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/portuguese/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ Complete a função usando as regras abaixo para modificar o objeto passado para - A função precisa sempre retornar todo o objeto `records`. - Se `value` for uma string vazia, remova a propriedade `prop` recebida do álbum. - Se `prop` não for `tracks` e `value` não for uma string vazia, atribua `value` à `prop` daquele álbum. -- Se `prop` for `tracks` e o valor não for uma string vazia, adicione o `value` ao final do array existente de `tracks` do álbum. Você precisa criar esse array primeiro se o álbum não tiver uma propriedade `tracks`. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **Observação:** uma cópia do objeto `recordCollection` é usada para testes. Você não deve modificar diretamente o objeto `recordCollection`. diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-23-non-abundant-sums.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-23-non-abundant-sums.md index cc7079af8c4..149d3bfc950 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-23-non-abundant-sums.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-23-non-abundant-sums.md @@ -1,6 +1,6 @@ --- id: 5900f3831000cf542c50fe96 -title: 'Problem 23: Non-abundant sums' +title: 'Problema 23: Soma dos números não abundantes' challengeType: 1 forumTopicId: 301873 dashedName: problem-23-non-abundant-sums @@ -8,41 +8,41 @@ dashedName: problem-23-non-abundant-sums # --description-- -A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number. +Um número perfeito é aquele igual à soma de seus divisores próprios. Por exemplo, a soma dos divisores próprios de 28 é 1 + 2 + 4 + 7 + 14 = 28. Isso significa que 28 é um número perfeito. -A number `n` is called deficient if the sum of its proper divisors is less than `n` and it is called abundant if this sum exceeds `n`. +Um número `n` é chamado de deficiente se a soma de seus divisores próprios for menor que `n`. Se a soma dos divisores próprios for maior que `n`, esse número é chamado de abundante. -As 12 is the smallest abundant number, 1 + 2 + 3 + 4 + 6 = 16, the smallest number that can be written as the sum of two abundant numbers is 24. By mathematical analysis, it can be shown that all integers greater than 28123 can be written as the sum of two abundant numbers. However, this upper limit cannot be reduced any further by analysis even though it is known that the greatest number that cannot be expressed as the sum of two abundant numbers is less than this limit. +Como 12 é o menor número abundante, 1 + 2 + 3 + 4 + 6 = 16, o menor número que pode ser escrito como a soma de dois números abundantes é 24. Usando análise matemática, podemos comprovar que todos os números inteiros maiores que 28123 podem ser escritos como a soma de dois números abundantes. No entanto, este limite máximo não pode ser reduzido através de uma análise, embora se saiba que o maior número que não pode ser expresso como a soma de dois números abundantes é inferior a este limite. -Find the sum of all positive integers <= `n` which cannot be written as the sum of two abundant numbers. +Calcule a soma de todos os números inteiros positivos <= `n` que não podem ser escritos como a soma de dois números abundantes. # --hints-- -`sumOfNonAbundantNumbers(10000)` should return a number. +`sumOfNonAbundantNumbers(10000)` deve retornar um número. ```js assert(typeof sumOfNonAbundantNumbers(10000) === 'number'); ``` -`sumOfNonAbundantNumbers(10000)` should return 3731004. +`sumOfNonAbundantNumbers(10000)` deve retornar 3731004. ```js assert(sumOfNonAbundantNumbers(10000) === 3731004); ``` -`sumOfNonAbundantNumbers(15000)` should return 4039939. +`sumOfNonAbundantNumbers(15000)` deve retornar 4039939. ```js assert(sumOfNonAbundantNumbers(15000) === 4039939); ``` -`sumOfNonAbundantNumbers(20000)` should return 4159710. +`sumOfNonAbundantNumbers(20000)` deve retornar 4159710. ```js assert(sumOfNonAbundantNumbers(20000) === 4159710); ``` -`sumOfNonAbundantNumbers(28123)` should return 4179871. +`sumOfNonAbundantNumbers(28123)` deve retornar 4179871. ```js assert(sumOfNonAbundantNumbers(28123) === 4179871); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-27-quadratic-primes.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-27-quadratic-primes.md index e7c8ebe01eb..75926763a06 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-27-quadratic-primes.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-27-quadratic-primes.md @@ -1,6 +1,6 @@ --- id: 5900f3871000cf542c50fe9a -title: 'Problem 27: Quadratic primes' +title: 'Problema 27: Primos quadráticos' challengeType: 1 forumTopicId: 301919 dashedName: problem-27-quadratic-primes @@ -8,51 +8,51 @@ dashedName: problem-27-quadratic-primes # --description-- -Euler discovered the remarkable quadratic formula: +Euler descobriu a notável fórmula do segundo grau:
$n^2 + n + 41$
-It turns out that the formula will produce 40 primes for the consecutive integer values $0 \\le n \\le 39$. However, when $n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41$ is divisible by 41, and certainly when $n = 41, 41^2 + 41 + 41$ is clearly divisible by 41. +Essa fórmula vai produzir 40 números primos para os valores inteiros consecutivos $0 \\le n \\le 39$. No entanto, quando temos $n = 40, 40^2 + 40 + 41 = 40(40 + 1) + 41$ é divisível por 41, e certamente quando temos $n = 41, 41^2 + 41 + 41$ é claramente divisível por 41. -The incredible formula $n^2 - 79n + 1601$ was discovered, which produces 80 primes for the consecutive values $0 \\le n \\le 79$. The product of the coefficients, −79 and 1601, is −126479. +Uma fórmula incrível foi descoberta, $n^2 - 79n + 1601$, que produz 80 primos para os valores de $0 \\le n \\le 79$ consecutivos. O produto dos coeficientes, −79 e 1601, é -126479. -Considering quadratics of the form: +Considerando os quadráticos da fórmula:
- $n^2 + an + b$, where $|a| < range$ and $|b| \le range$
- where $|n|$ is the modulus/absolute value of $n$
- e.g. $|11| = 11$ and $|-4| = 4$
+ $n^2 + an + b$, onde $➲ a├< range$ e $├b├\le range$
+ onde $├n├$ é o modulo/valor absoluto de $n$
+ exemplo: $➲ 11├= 11$ e $├-4^\\= 4$
-Find the product of the coefficients, $a$ and $b$, for the quadratic expression that produces the maximum number of primes for consecutive values of $n$, starting with $n = 0$. +Encontre o produto dos coeficientes, $a$ e $b$, para a expressão do segundo grau que produz o número máximo de primos para valores consecutivos de $n$, começando com $n = 0$. # --hints-- -`quadraticPrimes(200)` should return a number. +`quadraticPrimes(200)` deve retornar um número. ```js assert(typeof quadraticPrimes(200) === 'number'); ``` -`quadraticPrimes(200)` should return -4925. +`quadraticPrimes(200)` deve retornar -4925. ```js assert(quadraticPrimes(200) == -4925); ``` -`quadraticPrimes(500)` should return -18901. +`quadraticPrimes(500)` deve retornar -18901. ```js assert(quadraticPrimes(500) == -18901); ``` -`quadraticPrimes(800)` should return -43835. +`quadraticPrimes(800)` deve retornar -43835. ```js assert(quadraticPrimes(800) == -43835); ``` -`quadraticPrimes(1000)` should return -59231. +`quadraticPrimes(1000)` deve retornar -59231. ```js assert(quadraticPrimes(1000) == -59231); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-35-circular-primes.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-35-circular-primes.md index aaae9562bb0..eda4f882091 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-35-circular-primes.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-35-circular-primes.md @@ -1,6 +1,6 @@ --- id: 5900f38f1000cf542c50fea2 -title: 'Problem 35: Circular primes' +title: 'Problema 35: Números primos circulares' 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. +O número 197 é chamado de primo circular porque todas as rotações dos algarismos: 197, 971 e 719 formam números primos. -There are thirteen such primes below 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79, and 97. +Há treze números primos menores que 100: 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 79 e 97. -How many circular primes are there below `n`, whereas 100 ≤ `n` ≤ 1000000? +Quantos números primos circulares existem abaixo de `n`, onde 100 ≤ `n` ≤ 1000000? -**Note:** +**Observação:** -Circular primes individual rotation can exceed `n`. +A rotação dos números primos circulares pode ser maior que `n`. # --hints-- -`circularPrimes(100)` should return a number. +`circularPrimes(100)` deve retornar um número. ```js assert(typeof circularPrimes(100) === 'number'); ``` -`circularPrimes(100)` should return 13. +`circularPrimes(100)` deve retornar 13. ```js assert(circularPrimes(100) == 13); ``` -`circularPrimes(100000)` should return 43. +`circularPrimes(100000)` deve retornar 43. ```js assert(circularPrimes(100000) == 43); ``` -`circularPrimes(250000)` should return 45. +`circularPrimes(250000)` deve retornar 45. ```js assert(circularPrimes(250000) == 45); ``` -`circularPrimes(500000)` should return 49. +`circularPrimes(500000)` deve retornar 49. ```js assert(circularPrimes(500000) == 49); ``` -`circularPrimes(750000)` should return 49. +`circularPrimes(750000)` deve retornar 49. ```js assert(circularPrimes(750000) == 49); ``` -`circularPrimes(1000000)` should return 55. +`circularPrimes(1000000)` deve retornar 55. ```js assert(circularPrimes(1000000) == 55); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-58-spiral-primes.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-58-spiral-primes.md index 70b80ebf2a1..4f0a84f3c77 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-58-spiral-primes.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-58-spiral-primes.md @@ -1,6 +1,6 @@ --- id: 5900f3a61000cf542c50feb9 -title: 'Problem 58: Spiral primes' +title: 'Problema 58: Espiral de números primos' challengeType: 1 forumTopicId: 302169 dashedName: problem-58-spiral-primes @@ -8,7 +8,7 @@ dashedName: problem-58-spiral-primes # --description-- -Starting with 1 and spiralling anticlockwise in the following way, a square spiral with side length 7 is formed. +Começando com o número 1 e movendo-se em espiral no sentido anti-horário, uma espiral quadrada com cada lado contendo 7 números é formada.
37 36 35 34 33 32 31
@@ -20,31 +20,31 @@ Starting with 1 and spiralling anticlockwise in the following way, a square spir 43 44 45 46 47 48 49
-It is interesting to note that the odd squares lie along the bottom right diagonal, but what is more interesting is that 8 out of the 13 numbers lying along both diagonals are prime; that is, a ratio of 8/13 ≈ 62%. +É interessante notar que os números ímpares estão ao longo da diagonal inferior direita. Mas o mais interessante é que 8 dos 13 números que estão em ambas as diagonais são primos, ou seja, uma proporção de 8/13 ≈ 62%. -If one complete new layer is wrapped around the spiral above, a square spiral with side length 9 will be formed. If this process is continued, what is the side length of the square spiral for which the percent of primes along both diagonals first falls below `percent`? +Se envolvermos a espiral acima com uma nova camada, a espiral passará a ter 9 números em cada lado. Se este processo continuar, qual será o comprimento de cada lado da espiral onde a porcentagem de números primos ao longo de ambas as diagonais é menor que `percent`? # --hints-- -`spiralPrimes(50)` should return a number. +`spiralPrimes(50)` deve retornar um número. ```js assert(typeof spiralPrimes(50) === 'number'); ``` -`spiralPrimes(50)` should return `11`. +`spiralPrimes(50)` deve retornar `11`. ```js assert.strictEqual(spiralPrimes(50), 11); ``` -`spiralPrimes(15)` should return `981`. +`spiralPrimes(15)` deve retornar `981`. ```js assert.strictEqual(spiralPrimes(15), 981); ``` -`spiralPrimes(10)` should return `26241`. +`spiralPrimes(10)` deve retornar `26241`. ```js assert.strictEqual(spiralPrimes(10), 26241); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-66-diophantine-equation.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-66-diophantine-equation.md index 9e01ce1b0c5..19d08ea4532 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-66-diophantine-equation.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-66-diophantine-equation.md @@ -1,6 +1,6 @@ --- id: 5900f3ae1000cf542c50fec1 -title: 'Problem 66: Diophantine equation' +title: 'Problema 66: Equação Diofantina' challengeType: 1 forumTopicId: 302178 dashedName: problem-66-diophantine-equation @@ -8,15 +8,15 @@ dashedName: problem-66-diophantine-equation # --description-- -Consider quadratic Diophantine equations of the form: +Considere a fórmula da equação Diofantina:
x2 – Dy2 = 1
-For example, when D=13, the minimal solution in x is 6492 – 13×1802 = 1. +Por exemplo, quando D = 13, a solução mínima de x é 6492 - 13×1802 = 1. -It can be assumed that there are no solutions in positive integers when D is square. +Podemos partir do princípio de que não há soluções para números inteiros positivos quando D é o resultado de um número elevado ao quadrado. -By finding minimal solutions in x for D = {2, 3, 5, 6, 7}, we obtain the following: +Ao encontrar soluções mínimas de x onde D = {2, 3, 5, 6, 7}, obtemos o seguinte:
32 – 2×22 = 1
@@ -26,43 +26,43 @@ By finding minimal solutions in x for D = {2, 3, 5, 6, 7}, we obtain the followi 82 – 7×32 = 1
-Hence, by considering minimal solutions in `x` for D ≤ 7, the largest `x` is obtained when D=5. +Portanto, considerando soluções mínimas de `x` onde D ≤ 7, o maior `x` é obtido quando D = 5. -Find the value of D ≤ `n` in minimal solutions of `x` for which the largest value of `x` is obtained. +Calcule o valor de D ≤ `n` em soluções mínimas de `x` para as quais o maior valor de `x` é obtido. # --hints-- -`diophantineEquation(7)` should return a number. +`diophantineEquation(7)` deve retornar um número. ```js assert(typeof diophantineEquation(7) === 'number'); ``` -`diophantineEquation(7)` should return `5`. +`diophantineEquation(7)` deve retornar `5`. ```js assert.strictEqual(diophantineEquation(7), 5); ``` -`diophantineEquation(100)` should return `61`. +`diophantineEquation(100)` deve retornar `61`. ```js assert.strictEqual(diophantineEquation(100), 61); ``` -`diophantineEquation(409)` should return `409`. +`diophantineEquation(409)` deve retornar `409`. ```js assert.strictEqual(diophantineEquation(409), 409); ``` -`diophantineEquation(500)` should return `421`. +`diophantineEquation(500)` deve retornar `421`. ```js assert.strictEqual(diophantineEquation(500), 421); ``` -`diophantineEquation(1000)` should return `661`. +`diophantineEquation(1000)` deve retornar `661`. ```js assert.strictEqual(diophantineEquation(1000), 661); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-91-right-triangles-with-integer-coordinates.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-91-right-triangles-with-integer-coordinates.md index 7874cbab3fc..1d9480170c3 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-91-right-triangles-with-integer-coordinates.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-91-right-triangles-with-integer-coordinates.md @@ -1,6 +1,6 @@ --- id: 5900f3c71000cf542c50feda -title: 'Problem 91: Right triangles with integer coordinates' +title: 'Problema 91: Triângulos retângulos com coordenadas inteiras' challengeType: 1 forumTopicId: 302208 dashedName: problem-91-right-triangles-with-integer-coordinates @@ -8,43 +8,43 @@ dashedName: problem-91-right-triangles-with-integer-coordinates # --description-- -The points ${P}(x_1, y_1)$ and ${Q}(x_2, y_2)$ are plotted at integer co-ordinates and are joined to the origin, ${O}(0, 0)$, to form ${\Delta}OPQ$. +Os pontos ${P}(x_1, y_1)$ e ${Q}(x_2, y_2)$ são desenhados em coordenadas de números inteiros e ligadas à origem, ${O}(0, 0)$, para formar ${\Delta}OPQ$. -a graph plotting points P (x_1, y_1) and Q(x_2, y_2) at integer coordinates that are joined to the origin O (0, 0) +um gráfico mostrando os pontos P (x_1, y_1) e Q(x_2, y_2) em coordenadas inteiras ligadas à origem O (0, 0) -There are exactly fourteen triangles containing a right angle that can be formed when each co-ordinate lies between 0 and 2 inclusive; that is, $0 ≤ x_1, y_1, x_2, y_2 ≤ 2$. +Há exatamente catorze triângulos contendo um ângulo reto que podem ser formados quando cada coordenada se encontra entre 0 e 2, ou seja, $0 ≤ x_1, y_1, x_2, y_2 ≤ 2$. -a diagram showing the 14 triangles containing a right angle that can be formed when each coordinate is between 0 and 2 +um diagrama mostrando os 14 triângulos contendo um ângulo reto que podem ser formadas quando cada coordenada está entre 0 e 2 -Given that $0 ≤ x_1, y_1, x_2, y_2 ≤ limit$, how many right triangles can be formed? +Considerando $0 ≤ x_1, y_1, x_2, y_2 ≤ limit$, quantos triângulos retângulos podem ser formados? # --hints-- -`rightTrianglesIntCoords(2)` should return a number. +`rightTrianglesIntCoords(2)` deve retornar um número. ```js assert(typeof rightTrianglesIntCoords(2) === 'number'); ``` -`rightTrianglesIntCoords(2)` should return `14`. +`rightTrianglesIntCoords(2)` deve retornar `14`. ```js assert.strictEqual(rightTrianglesIntCoords(2), 14); ``` -`rightTrianglesIntCoords(10)` should return `448`. +`rightTrianglesIntCoords(10)` deve retornar `448`. ```js assert.strictEqual(rightTrianglesIntCoords(10), 448); ``` -`rightTrianglesIntCoords(25)` should return `3207`. +`rightTrianglesIntCoords(25)` deve retornar `3207`. ```js assert.strictEqual(rightTrianglesIntCoords(25), 3207); ``` -`rightTrianglesIntCoords(50)` should return `14234`. +`rightTrianglesIntCoords(50)` deve retornar `14234`. ```js assert.strictEqual(rightTrianglesIntCoords(50), 14234); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md index f54ab71dd62..d7e6444f89c 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-1-to-100/problem-98-anagramic-squares.md +++ b/curriculum/challenges/portuguese/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: Quadrados anagrâmicos' 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. +Ao substituir cada uma das letras na palavra CARE por 1, 2, 9 e 6, respectivamente, formamos um número quadrado: $1296 = 36^2$. O que é notável é que, usando as mesmas substituições digitais, o anagrama, RACE, também formamos um número quadrado: $9216 = 96^2$. Vamos chamar CARE (e RACE) de um par de palavras de anagrama quadrado. Especificaremos mais adiante que zeros à frente do número não são permitidos, nem uma outra letra pode ter o mesmo valor numérico que outra. -Using the `words` array, find all the square anagram word pairs (a palindromic word is NOT considered to be an anagram of itself). +Usando o array `words`, encontre todos os pares de palavras que são anagramas quadrados (uma palavra palindrômica NÃO é considerada um anagrama de si mesmo). -What is the largest square number formed by any member of such a pair? +Qual é o maior número quadrado formado por algum membro de um par desse tipo? -**Note:** All anagrams formed must be contained in the given `words` array. +**Observação:** todos os anagramas formados devem estar contidos no array dado `words`. # --hints-- -`anagramicSquares(['CARE', 'RACE'])` should return a number. +`anagramicSquares(['CARE', 'RACE'])` deve retornar um número. ```js assert(typeof anagramicSquares(['CARE', 'RACE']) === 'number'); ``` -`anagramicSquares(['CARE', 'RACE'])` should return `9216`. +`anagramicSquares(['CARE', 'RACE'])` deve retornar `9216`. ```js assert.strictEqual(anagramicSquares(['CARE', 'RACE']), 9216); ``` -`anagramicSquares(testWords1)` should return `4761`. +`anagramicSquares(testWords1)` deve retornar `4761`. ```js assert.strictEqual(anagramicSquares(_testWords1), 4761); ``` -`anagramicSquares(testWords2)` should return `18769`. +`anagramicSquares(testWords2)` deve retornar `18769`. ```js assert.strictEqual(anagramicSquares(_testWords2), 18769); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-109-darts.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-109-darts.md index 5064f7e146c..abe53a96671 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-109-darts.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-109-darts.md @@ -1,6 +1,6 @@ --- id: 5900f3db1000cf542c50feec -title: 'Problem 109: Darts' +title: 'Problema 109: Dardos' challengeType: 1 forumTopicId: 301733 dashedName: problem-109-darts @@ -8,17 +8,17 @@ dashedName: problem-109-darts # --description-- -In the game of darts a player throws three darts at a target board which is split into twenty equal sized sections numbered one to twenty. +No jogo de dardos, um jogador joga três dardos em um alvo que é dividido em vinte seções de tamanho igual, numeradas de um a vinte. -Darts board +Alvo dos dardos -The score of a dart is determined by the number of the region that the dart lands in. A dart landing outside the red/green outer ring scores zero. The black and cream regions inside this ring represent single scores. However, the red/green outer ring and middle ring score double and treble scores respectively. +A pontuação de um dardo é determinada pelo número da região que o dardo atinge. Um dardo aterrissando fora do anel externo vermelho/verde, marca zero. As regiões preta e creme dentro deste anel representam pontuações únicas. No entanto, o anel externo vermelho/verde e o anel do meio têm pontuações duplas e triplas, respectivamente. -At the center of the board are two concentric circles called the bull region, or bulls-eye. The outer bull is worth 25 points and the inner bull is a double, worth 50 points. +No centro do tabuleiro, há dois círculos concêntricos, a região chamada bull, ou bullseye. O bull externo vale 25 pontos e o bull interno é um duplo, valendo 50 pontos. -There are many variations of rules but in the most popular game the players will begin with a score of 301 or 501 and the first player to reduce their running total to zero is a winner. However, it is normal to play a "doubles out" system, which means that the player must land a double (including the double bulls-eye at the center of the board) on their final dart to win; any other dart that would reduce their running total to one or lower means the score for that set of three darts is "bust". +Há muitas variações de regras, mas, no jogo mais popular, os jogadores começarão com uma pontuação de 301 ou 501 e o primeiro jogador a reduzir seu total de aproveitamento para zero é um vencedor. No entanto, é normal jogar um sistema de "duplos fora", o que significa que o jogador deve acertar um duplo (incluindo o alvo duplo no centro do tabuleiro) em seu dardo final para vencer; qualquer outro dardo que reduziria seu total de corrida para um ou menos significa que a pontuação para aquele conjunto de três dardos foi um "fracasso". -When a player is able to finish on their current score it is called a "checkout" and the highest checkout is 170: T20 T20 D25 (two treble 20s and double bull). There are exactly eleven distinct ways to checkout on a score of 6: +Quando um jogador consegue terminar na pontuação atual, ela é chamada de "check-out". O check-out mais alto vale 170: T20 T20 D25 (dois 20s triplos e um duplo bull). Há exatamente onze maneiras distintas de marcar uma pontuação de 6: $$\begin{array} \text{D3} & & \\\\ D1 & D2 & \\\\ S2 & D2 & \\\\ @@ -27,11 +27,11 @@ $$\begin{array} \text{D3} & & \\\\ S1 & S3 & D1 \\\\ D1 & D1 & D1 \\\\ D1 & S2 & D1 \\\\ S2 & S2 & D1 \end{array}$$ -Note that D1 D2 is considered different from D2 D1 as they finish on different doubles. However, the combination S1 T1 D1 is considered the same as T1 S1 D1. In addition, we shall not include misses in considering combinations; for example, D3 is the same as 0 D3 and 0 0 D3. Incredibly there are 42336 distinct ways of checking out in total. How many distinct ways can a player checkout with a score less than 100? +Observe que D1 D2 é considerado diferente de D2 D1, pois terminam em duplas diferentes. No entanto, a combinação S1 T1 D1 é considerada a mesma que T1 S1 D1. Além disso, não devemos incluir erros ao considerar as combinações; por exemplo, D3 é o mesmo que 0 D3 e 0 0 D3. Incrivelmente, no total, existem 42336 maneiras distintas de fazer checkout. De quantas maneiras diferentes um jogador pode finalizar com uma pontuação inferior a 100? # --hints-- -`darts()` should return `38182`. +`darts()` deve retornar `38182`. ```js assert.strictEqual(darts(), 38182); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-131-prime-cube-partnership.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-131-prime-cube-partnership.md index 73e7e8e7490..6b80415e97d 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-131-prime-cube-partnership.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-131-prime-cube-partnership.md @@ -1,6 +1,6 @@ --- id: 5900f3ef1000cf542c50ff02 -title: 'Problem 131: Prime cube partnership' +title: 'Problema 131: Associação dos cubos primos' challengeType: 1 forumTopicId: 301759 dashedName: problem-131-prime-cube-partnership @@ -8,17 +8,17 @@ dashedName: problem-131-prime-cube-partnership # --description-- -There are some prime values, $p$, for which there exists a positive integer, $n$, such that the expression $n^3 + n^{2}p$ is a perfect cube. +Existem alguns valores primos, $p$, para os quais também existe um número inteiro positivo, $n$, tal que a expressão $n^3 + n^{2}p$ é um cubo perfeito. -For example, when $p = 19,\\ 8^3 + 8^2 × 19 = {12}^3$. +Por exemplo, quando $p = 19,\\ 8^3 + 8^2 x 19 = {12}^3$. -What is perhaps most surprising is that the value of $n$ is unique for each prime with this property, and there are only four such primes below one hundred. +O que é talvez mais surpreendente é que o valor de $n$ é único para cada primo com essa propriedade, e só existem 4 primos com essa propriedade abaixo de 100. -How many primes below one million have this remarkable property? +Quantos primos abaixo de 1 milhão possuem essa propriedade notável? # --hints-- -`primeCubePartnership()` should return `173`. +`primeCubePartnership()` deve retornar `173`. ```js assert.strictEqual(primeCubePartnership(), 173); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.md index 52005157a98..223e269bd4c 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-169-exploring-the-number-of-different-ways-a-number-can-be-expressed-as-a-sum-of-powers-of-2.md @@ -1,7 +1,7 @@ --- id: 5900f4151000cf542c50ff28 title: >- - Problem 169: Exploring the number of different ways a number can be expressed as a sum of powers of 2 + Problema 169: Explorar o número de maneiras diferentes pelas quais um número pode ser expresso como uma soma de potências de 2 challengeType: 1 forumTopicId: 301803 dashedName: >- @@ -10,19 +10,19 @@ dashedName: >- # --description-- -Define $f(0)=1$ and $f(n)$ to be the number of different ways $n$ can be expressed as a sum of integer powers of 2 using each power no more than twice. +Defina $f(0)=1$ e $f(n)$ como o número de diferentes maneiras pelas quais $n$ pode ser expresso como uma soma de potências inteiras de 2 usando cada potência não mais que duas vezes. -For example, $f(10)=5$ since there are five different ways to express 10: +Por exemplo, $f(10)=5$ já que há cinco maneiras diferentes de expressar 10: $$\begin{align} & 1 + 1 + 8 \\\\ & 1 + 1 + 4 + 4 \\\\ & 1 + 1 + 2 + 2 + 4 \\\\ & 2 + 4 + 4 \\\\ & 2 + 8 \end{align}$$ -What is $f({10}^{25})$? +Qual é $f({10}^{25})$? # --hints-- -`numberOfWaysToExpress()` should return `178653872807`. +`numberOfWaysToExpress()` deve retornar `178653872807`. ```js assert.strictEqual(numberOfWaysToExpress(), 178653872807); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-176-right-angled-triangles-that-share-a-cathetus.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-176-right-angled-triangles-that-share-a-cathetus.md index 01056496296..c80e12dca0d 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-176-right-angled-triangles-that-share-a-cathetus.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-176-right-angled-triangles-that-share-a-cathetus.md @@ -1,6 +1,6 @@ --- id: 5900f41c1000cf542c50ff2f -title: 'Problem 176: Right-angled triangles that share a cathetus' +title: 'Problema 176: Triângulos retos que compartilham um cateto' challengeType: 1 forumTopicId: 301811 dashedName: problem-176-right-angled-triangles-that-share-a-cathetus @@ -8,13 +8,13 @@ dashedName: problem-176-right-angled-triangles-that-share-a-cathetus # --description-- -The four right-angled triangles with sides (9,12,15), (12,16,20), (5,12,13) and (12,35,37) all have one of the shorter sides (catheti) equal to 12. It can be shown that no other integer sided right-angled triangle exists with one of the catheti equal to 12. +Os quatro triângulos retos com lados (9,12,15), (12,16,20), (5,12,13) e (12,35,37) têm um dos lados menores (catetos) igual a 12. Pode-se mostrar que nenhum outro triângulo reto existe com um dos catetos igual a 12. -Find the smallest integer that can be the length of a cathetus of exactly 47547 different integer sided right-angled triangles. +Encontre o menor número inteiro que pode ser o comprimento de um cateto de exatamente 47547 triângulos retos de lados diferentes de números inteiros. # --hints-- -`trianglesSharingCathetus()` should return `96818198400000`. +`trianglesSharingCathetus()` deve retornar `96818198400000`. ```js assert.strictEqual(trianglesSharingCathetus(), 96818198400000); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.md index f98d3a71b9e..af115255da1 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-181-investigating-in-how-many-ways-objects-of-two-different-colours-can-be-grouped.md @@ -1,7 +1,7 @@ --- id: 5900f4231000cf542c50ff34 title: >- - Problem 181: Investigating in how many ways objects of two different colours can be grouped + Problema 181: Investigação de em quantas maneiras objetos de duas cores diferentes podem ser agrupados challengeType: 1 forumTopicId: 301817 dashedName: >- @@ -10,15 +10,15 @@ dashedName: >- # --description-- -Having three black objects $B$ and one white object $W$ they can be grouped in 7 ways like this: +Quando temos três objetos pretos $B$ e um objeto branco $W$, eles podem ser agrupados de 7 maneiras assim: $$(BBBW)\\;(B,BBW)\\;(B,B,BW)\\;(B,B,B,W)\\;(B,BB,W)\\;(BBB,W)\\;(BB,BW)$$ -In how many ways can sixty black objects $B$ and forty white objects $W$ be thus grouped? +De quantas formas podem ser agrupados sessenta objetos pretos $B$ e quarenta objetos brancos $W$? # --hints-- -`colorsGrouping()` should return `83735848679360670`. +`colorsGrouping()` deve retornar `83735848679360670`. ```js assert.strictEqual(colorsGrouping(), 83735848679360670); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-193-squarefree-numbers.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-193-squarefree-numbers.md index 7e17fd27c15..26b90384c5b 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-193-squarefree-numbers.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-193-squarefree-numbers.md @@ -1,6 +1,6 @@ --- id: 5900f42f1000cf542c50ff41 -title: 'Problem 193: Squarefree Numbers' +title: 'Problema 193: Números livres de quadrados' challengeType: 1 forumTopicId: 301831 dashedName: problem-193-squarefree-numbers @@ -8,13 +8,13 @@ dashedName: problem-193-squarefree-numbers # --description-- -A positive integer $n$ is called squarefree, if no square of a prime divides $n$, thus 1, 2, 3, 5, 6, 7, 10, 11 are squarefree, but not 4, 8, 9, 12. +Um número inteiro positivo $n$ é chamado de livre de quadrados se nenhum quadrado de um número primo dividir $n$. Assim, 1, 2, 3, 5, 6, 7, 10, 11 são livres de quadrados, mas 4, 8, 9, 12 não são. -How many squarefree numbers are there below $2^{50}$? +Quantos números livres de quadrados existem abaixo de $2^{50}$? # --hints-- -`squarefreeNumbers()` should return `684465067343069`. +`squarefreeNumbers()` deve retornar `684465067343069`. ```js assert.strictEqual(squarefreeNumbers(), 684465067343069); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.md index 608f288e3e9..4cf8404101c 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-101-to-200/problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence.md @@ -1,6 +1,6 @@ --- id: 5900f4311000cf542c50ff44 -title: 'Problem 197: Investigating the behaviour of a recursively defined sequence' +title: 'Problema 197: Investigação do comportamento de uma sequência definida recursivamente' challengeType: 1 forumTopicId: 301835 dashedName: problem-197-investigating-the-behaviour-of-a-recursively-defined-sequence @@ -8,13 +8,13 @@ dashedName: problem-197-investigating-the-behaviour-of-a-recursively-defined-seq # --description-- -Given is the function $f(x) = ⌊{2}^{30.403243784 - x^2}⌋ × {10}^{-9}$ ( ⌊ ⌋ is the floor-function), the sequence $u_n$ is defined by $u_0 = -1$ and $u_{n + 1} = f(u_n)$. +Dada a função $f(x) = ⌊{2}^{30.403243784 - x^2}⌋ × {10}^{-9}$ (onde ⌊ ⌋ é a função piso), a sequência $u_n$ é definida por $u_0 = -1$ e $u_{n + 1} = f(u_n)$. -Find $u_n + u_{n + 1}$ for $n = {10}^{12}$. Give your answer with 9 digits after the decimal point. +Encontre $u_n + u_{n + 1}$ para $n = {10}^{12}$. Dê sua resposta com 9 algarismos após o ponto (9 casas depois da vírgula). # --hints-- -`recursivelyDefinedSequence()` should return `1.710637717`. +`recursivelyDefinedSequence()` deve retornar `1.710637717`. ```js assert.strictEqual(recursivelyDefinedSequence(), 1.710637717); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-253-tidying-up.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-253-tidying-up.md index 3dbeca51b38..f409e48c31c 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-253-tidying-up.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-253-tidying-up.md @@ -1,6 +1,6 @@ --- id: 5900f4691000cf542c50ff7c -title: 'Problem 253: Tidying up' +title: 'Problema 253: Organização' challengeType: 1 forumTopicId: 301901 dashedName: problem-253-tidying-up @@ -8,42 +8,42 @@ 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. +Uma criança tem uma "lagarta numérica", composta por quarenta pedaços de quebra-cabeça, cada um com um número, que, quando ligados em uma linha, revelam os números de 1 a 40 em ordem. -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. +Todas as noites, o pai da criança tem de pegar os pedaços da lagarta que estão espalhados pela sala. Ele pega as peças aleatoriamente e as coloca na ordem correta. -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). +Ao ser construída desta forma, a lagarta forma segmentos distintos que gradualmente se fundem juntos. O número de segmentos começa em zero (sem pedaços colocados), e vai aumentando até cerca de onze ou doze, então tende a diminuir novamente antes de terminar em um único segmento (todas as partes colocadas). -For example: +Por exemplo: -| Piece Placed | Segments So Far | -| ------------ | --------------- | -| 12 | 1 | -| 4 | 2 | -| 29 | 3 | -| 6 | 4 | -| 34 | 5 | -| 5 | 4 | -| 35 | 4 | -| … | … | +| Peça colocada | Segmentos até então | +| ------------- | ------------------- | +| 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 +Considere $M$ como o número máximo de segmentos encontrados durante uma organização aleatória da lagarta. Para uma lagarta de dez peças, o número de possibilidades para cada $M$ é -| M | Possibilities | -| - | ------------- | -| 1 | 512 | -| 2 | 250912 | -| 3 | 1815264 | -| 4 | 1418112 | -| 5 | 144000 | +| M | Possibilidades | +| - | -------------- | +| 1 | 512 | +| 2 | 250912 | +| 3 | 1815264 | +| 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. +então o valor mais provável de $M$ é 3 e o valor médio é $\frac{385.643}{113.400} = 3,400732$, arredondado para seis casas decimais. -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. +O valor mais provável de $M$ para uma lagarta de quarenta peças é de 11, mas qual é o valor médio de $M$? Dê sua resposta arredondada para seis casas decimais. # --hints-- -`tidyingUp()` should return `11.492847`. +`tidyingUp()` deve retornar `11.492847`. ```js assert.strictEqual(tidyingUp(), 11.492847); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-281-pizza-toppings.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-281-pizza-toppings.md index 60b84a893f8..b3767fadc00 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-281-pizza-toppings.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-281-pizza-toppings.md @@ -1,6 +1,6 @@ --- id: 5900f4861000cf542c50ff98 -title: 'Problem 281: Pizza Toppings' +title: 'Problema 281: Coberturas de pizza' challengeType: 1 forumTopicId: 301932 dashedName: problem-281-pizza-toppings @@ -8,19 +8,19 @@ dashedName: problem-281-pizza-toppings # --description-- -You are given a pizza (perfect circle) that has been cut into $m·n$ equal pieces and you want to have exactly one topping on each slice. +Você recebe uma pizza (círculo perfeito) que foi cortada em $m·n$ peças iguais e você quer ter exatamente um sabor em cada fatia. -Let $f(m,n)$ denote the number of ways you can have toppings on the pizza with $m$ different toppings ($m ≥ 2$), using each topping on exactly $n$ slices ($n ≥ 1$). Reflections are considered distinct, rotations are not. +Considere $f(m,n)$ como o número de maneiras de ter coberturas de pizza com $m$ sabores diferentes ($m ≥ 2$), usando cada cobertura em exatamente $n$ fatias ($n ≥ 1$). Reflexões são consideradas distintas, mas as rotações não são. -Thus, for instance, $f(2,1) = 1$, $f(2,2) = f(3,1) = 2$ and $f(3,2) = 16$. $f(3,2)$ is shown below: +Assim, por exemplo, $f(2,1) = 1$, $f(2,2) = f(3,1) = 2$ e $f(3,2) = 16$. $f(3,2)$ é mostrado abaixo: -animation with 16 ways to have 3 different toppings on 2 slices each +animação com 16 maneiras de ter 3 coberturas diferentes em 2 fatias cada -Find the sum of all $f(m,n)$ such that $f(m,n) ≤ {10}^{15}$. +Encontre a soma de todos os $f(m,n)$, tal que $f(m,n) £ {10}^{15}$. # --hints-- -`pizzaToppings()` should return `1485776387445623`. +`pizzaToppings()` deve retornar `1485776387445623`. ```js assert.strictEqual(pizzaToppings(), 1485776387445623); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-288-an-enormous-factorial.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-288-an-enormous-factorial.md index cd92a15cd8c..ea98dabfbe5 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-288-an-enormous-factorial.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-201-to-300/problem-288-an-enormous-factorial.md @@ -1,6 +1,6 @@ --- id: 5900f48d1000cf542c50ff9f -title: 'Problem 288: An enormous factorial' +title: 'Problema 288: Um fatorial enorme' challengeType: 1 forumTopicId: 301939 dashedName: problem-288-an-enormous-factorial diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-306-paper-strip-game.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-306-paper-strip-game.md index 3dd4604bc13..f22213897e6 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-306-paper-strip-game.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-306-paper-strip-game.md @@ -1,6 +1,6 @@ --- id: 5900f49f1000cf542c50ffb1 -title: 'Problem 306: Paper-strip Game' +title: 'Problema 306: Jogo das tiras de papel' challengeType: 1 forumTopicId: 301960 dashedName: problem-306-paper-strip-game @@ -8,27 +8,27 @@ dashedName: problem-306-paper-strip-game # --description-- -The following game is a classic example of Combinatorial Game Theory: +O jogo a seguir é um exemplo clássico da Teoria Combinatória de Jogos: -Two players start with a strip of $n$ white squares and they take alternate turns. On each turn, a player picks two contiguous white squares and paints them black. The first player who cannot make a move loses. +Dois jogadores começam com uma tira de papel com $n$ quadrados brancos e eles revezam turnos. Em cada turno, um jogador escolhe dois quadrados brancos vizinhos e os pinta de preto. O primeiro jogador que não puder fazer um movimento perde. -- $n = 1$: No valid moves, so the first player loses automatically. -- $n = 2$: Only one valid move, after which the second player loses. -- $n = 3$: Two valid moves, but both leave a situation where the second player loses. -- $n = 4$: There are three valid moves for the first player; who is able to win the game by painting the two middle squares. -- $n = 5$: Four valid moves for the first player (shown below in red); but no matter what the player does, the second player (blue) wins. +- $n = 1$: Sem movimentos válidos, então o primeiro jogador perde automaticamente. +- $n = 2$: Apenas um movimento válido, após o qual o segundo jogador perde. +- $n = 3$: Dois movimentos válidos, mas ambos deixam uma situação na qual o segundo jogador perde. +- $n = 4$: Há três movimentos válidos para o primeiro jogador; ele é capaz de vencer o jogo pintando os dois quadrados do meio. +- $n = 5$: Quatro movimentos válidos para o primeiro jogador (mostrado abaixo em vermelho); mas não importa o que o jogador faça, o segundo jogador (azul) ganha. -valid starting moves for strip with 5 squares +movimentos iniciais válidos para uma tira com 5 quadrados -So, for $1 ≤ n ≤ 5$, there are 3 values of $n$ for which the first player can force a win. +Então, para $1 ≤ n ≤ 5$, há 3 valores de $n$ para os quais o primeiro jogador pode forçar uma vitória. -Similarly, for $1 ≤ n ≤ 50$, there are 40 values of $n$ for which the first player can force a win. +Da mesma forma, para $1 ≤ n ≤ 50$, há 40 valores de $n$ para os quais o primeiro jogador pode forçar uma vitória. -For $1 ≤ n ≤ 1\\,000\\,000$, how many values of $n$ are there for which the first player can force a win? +Para $1 ≤ n ≤ 1.000.000$, quantos valores de $n$ existem para os quais o primeiro jogador pode forçar uma vitória? # --hints-- -`paperStripGame()` should return `852938`. +`paperStripGame()` deve retornar `852938`. ```js assert.strictEqual(paperStripGame(), 852938); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-309-integer-ladders.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-309-integer-ladders.md index 721b756f533..26325c0d608 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-309-integer-ladders.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-309-integer-ladders.md @@ -1,6 +1,6 @@ --- id: 5900f4a11000cf542c50ffb4 -title: 'Problem 309: Integer Ladders' +title: 'Problema 309: Escadas de números inteiros' challengeType: 1 forumTopicId: 301963 dashedName: problem-309-integer-ladders @@ -8,19 +8,19 @@ dashedName: problem-309-integer-ladders # --description-- -In the classic "Crossing Ladders" problem, we are given the lengths $x$ and $y$ of two ladders resting on the opposite walls of a narrow, level street. We are also given the height $h$ above the street where the two ladders cross and we are asked to find the width of the street ($w$). +No problema clássico das "escadas cruzadas", temos os comprimentos $x$ e $y$ de duas escadas colocadas contra paredes opostas de uma rua nivelada e estreita. Também somos informados da altura $h$ acima da rua onde as duas escadas se cruzam e nos é pedido para encontrar a largura da rua ($w$). -ladders x and y, crossing at the height h, and resting on opposite walls of the street of width w +escadas x e y, se cruzando na altura h, colocadas contra as paredes opostas da rua de largura w -Here, we are only concerned with instances where all four variables are positive integers. For example, if $x = 70$, $y = 119$ and $h = 30$, we can calculate that $w = 56$. +Aqui, estamos preocupados apenas com instâncias em que as quatro variáveis são números inteiros positivos. Por exemplo, se $x = 70$, $y = 119$ e $h = 30$, podemos calcular que $w = 56$. -In fact, for integer values $x$, $y$, $h$ and $0 < x < y < 200$, there are only five triplets ($x$, $y$, $h$) producing integer solutions for $w$: (70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) and (119, 175, 40). +De fato, para valores inteiros $x$, $y$, $h$ e $0 < x < y < 200$, há apenas cinco trios ($x$, $y$, $h$) que produzem soluções em números inteiros para $w$: (70, 119, 30), (74, 182, 21), (87, 105, 35), (100, 116, 35) e (119, 175, 40). -For integer values $x$, $y$, $h$ and $0 < x < y < 1\\,000\\,000$, how many triplets ($x$, $y$, $h$) produce integer solutions for $w$? +Para os valores inteiros $x$, $y$, $h$ e $0 < x < y < 1.000.000$, quantos trios ($x$, $y$, $h$) produzem soluções com números inteiros para $w$? # --hints-- -`integerLadders()` should return `210139`. +`integerLadders()` deve retornar `210139`. ```js assert.strictEqual(integerLadders(), 210139); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-340-crazy-function.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-340-crazy-function.md index 72da02c1095..1f7a7a3d4ea 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-340-crazy-function.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-340-crazy-function.md @@ -1,6 +1,6 @@ --- id: 5900f4c21000cf542c50ffd4 -title: 'Problem 340: Crazy Function' +title: 'Problema 340: Função maluca' challengeType: 1 forumTopicId: 301999 dashedName: problem-340-crazy-function @@ -8,20 +8,20 @@ dashedName: problem-340-crazy-function # --description-- -For fixed integers $a$, $b$, $c$, define the crazy function $F(n)$ as follows: +Para números inteiros fixos $a$, $b$, $c$, defina a função maluca $F(n)$ da seguinte forma: -$$\begin{align} & F(n) = n - c \\;\text{ for all } n > b \\\\ - & F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ for all } n ≤ b. \end{align}$$ +$$\begin{align} & F(n) = n - c \\;\text{ para todo } n > b \\\\ + & F(n) = F(a + F(a + F(a + F(a + n)))) \\;\text{ para todo } n ≤ b. \end{align}$$ -Also, define $S(a, b, c) = \displaystyle\sum_{n = 0}^b F(n)$. +Além disso, defina $S(a, b, c) = \displaystyle\sum_{n = 0}^b F(n)$. -For example, if $a = 50$, $b = 2000$ and $c = 40$, then $F(0) = 3240$ and $F(2000) = 2040$. Also, $S(50, 2000, 40) = 5\\,204\\,240$. +Por exemplo, se $a = 50$, $b = 2000$ e $c = 40$, então $F(0) = 3240$ e $F(2000) = 2040$. Além disso, $S(50, 2000, 40) = 5.204.240$. -Find the last 9 digits of $S({21}^7, 7^{21}, {12}^7)$. +Encontre os últimos 9 algarismos de $S({21}^7, 7^{21}, {12}^7)$. # --hints-- -`crazyFunction()` should return `291504964`. +`crazyFunction()` deve retornar `291504964`. ```js assert.strictEqual(crazyFunction(), 291504964); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-364-comfortable-distance.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-364-comfortable-distance.md index 83f8f7ec5d4..1f7ba3c39a0 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-364-comfortable-distance.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-364-comfortable-distance.md @@ -1,6 +1,6 @@ --- id: 5900f4d91000cf542c50ffea -title: 'Problem 364: Comfortable distance' +title: 'Problema 364: Distância confortável' challengeType: 1 forumTopicId: 302025 dashedName: problem-364-comfortable-distance @@ -8,23 +8,23 @@ dashedName: problem-364-comfortable-distance # --description-- -There are $N$ seats in a row. $N$ people come after each other to fill the seats according to the following rules: +Existem $N$ assentos em uma fila. $N$ pessoas vêm atrás umas das outras para preencher os lugares de acordo com as seguintes regras: -1. If there is any seat whose adjacent seat(s) are not occupied take such a seat. -2. If there is no such seat and there is any seat for which only one adjacent seat is occupied take such a seat. -3. Otherwise take one of the remaining available seats. +1. Se houver algum lugar no qual os assentos adjacentes não estejam ocupados, tome esse lugar. +2. Se não existir esse lugar e se houver algum lugar para o qual apenas um lugar adjacente esteja ocupado, tome esse lugar. +3. Caso contrário, pegue um dos lugares restantes disponíveis. -Let $T(N)$ be the number of possibilities that $N$ seats are occupied by $N$ people with the given rules. The following figure shows $T(4) = 8$. +Considere $T(N)$ como o número de possibilidades de que $N$ assentos estejam ocupados por $N$ pessoas com as regras dadas. A figura a seguir mostra $T(4) = 8$. -eight ways for N seats to be occupied by N people +oito maneiras de N lugares serem ocupados por N pessoas -We can verify that $T(10) = 61\\,632$ and $T(1\\,000)\bmod 100\\,000\\,007 = 47\\,255\\,094$. +Podemos verificar que $T(10) = 61.632$ e $T(1.000)\bmod 100.000.007 = 47.255.094$. -Find $T(1\\,000\\,000)\bmod 100\\,000\\,007$. +Encontre $T(1.000.000)\bmod 100.000.007$. # --hints-- -`comfortableDistance()` should return `44855254`. +`comfortableDistance()` deve retornar `44855254`. ```js assert.strictEqual(comfortableDistance(), 44855254); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-371-licence-plates.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-371-licence-plates.md index 18debebdeda..c0d64b0630a 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-371-licence-plates.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-301-to-400/problem-371-licence-plates.md @@ -8,21 +8,21 @@ dashedName: problem-371-licence-plates # --description-- -Oregon licence plates consist of three letters followed by a three digit number (each digit can be from [0...9]). +As placas de carro do Oregon consistem em três letras seguidas por um número de três algarismos (cada algarismo podendo estar entre [0...9]). -While driving to work Seth plays the following game: +Enquanto conduz para o trabalho, Seth joga o seguinte jogo: -Whenever the numbers of two licence plates seen on his trip add to 1000 that's a win. +Sempre que o número de duas placas de carro que ele vê na viagem somar 1000, é uma vitória. -E.g. `MIC-012` and `HAN-988` is a win and `RYU-500` and `SET-500` too (as long as he sees them in the same trip). +Ex: `MIC-012` e `HAN-988` é uma vitória e `RYU-500` e `SET-500` também (contanto que os veja na mesma viagem). -Find the expected number of plates he needs to see for a win. Give your answer rounded to 8 decimal places behind the decimal point. +Encontre o número esperado de licenças que ele precisa ver para a vitória. Dê sua resposta arredondada para 8 casas depois da vírgula. -**Note:** We assume that each licence plate seen is equally likely to have any three digit number on it. +**Observação:** consideramos que cada placa de carro vista tem igual probabilidade de ter um número de três algarismos nela. # --hints-- -`licensePlates()` should return `40.66368097`. +`licensePlates()` deve retornar `40.66368097`. ```js assert.strictEqual(licensePlates(), 40.66368097); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-404-crisscross-ellipses.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-404-crisscross-ellipses.md index 92690bd7a6d..123d3c6096d 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-404-crisscross-ellipses.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-404-crisscross-ellipses.md @@ -1,6 +1,6 @@ --- id: 5900f5001000cf542c510012 -title: 'Problem 404: Crisscross Ellipses' +title: 'Problema 404: Elipses cruzadas' challengeType: 1 forumTopicId: 302072 dashedName: problem-404-crisscross-ellipses @@ -8,27 +8,27 @@ dashedName: problem-404-crisscross-ellipses # --description-- -$E_a$ is an ellipse with an equation of the form $x^2 + 4y^2 = 4a^2$. +$E_a$ é uma elipse com a equação na forma $x^2 + 4y^2 = 4a^2$. -$E_a'$ is the rotated image of $E_a$ by $θ$ degrees counterclockwise around the origin $O(0, 0)$ for $0° < θ < 90°$. +$E_a'$ é a imagem rodada de $E_a$ por $θ$ graus no sentido anti-horário ao redor da origem $O(0, 0)$ para $0° < θ < 90°$. -ellipse E_a and ellipse rotated by θ degrees E_a' +elipse E_a e elipse rodada por θ graus E_a' -$b$ is the distance to the origin of the two intersection points closest to the origin and $c$ is the distance of the two other intersection points. +$b$ é a distância da origem dos dois pontos de interseção mais próximos da origem e $c$ é a distância dos outros dois pontos de interseção. -We call an ordered triplet ($a$, $b$, $c$) a canonical ellipsoidal triplet if $a$, $b$ and $c$ are positive integers. +Chamaremos um trio ordenado ($a$, $b$, $c$) de trio elipsoidal canônico se $a$, $b$ e $c$ forem números inteiros positivos. -For example, (209, 247, 286) is a canonical ellipsoidal triplet. +Por exemplo, (209, 247, 286) é um trio elipsoidal canônico. -Let $C(N)$ be the number of distinct canonical ellipsoidal triplets ($a$, $b$, $c$) for $a ≤ N$. +Considere $C(N)$ como o número de trios elipsoidais canônicos ($a$, $b$, $c$) distintos para $a ≤ N$. -It can be verified that $C({10}^3) = 7$, $C({10}^4) = 106$ and $C({10}^6) = 11\\,845$. +Pode-se verificar que $C({10}^3) = 7$, $C({10}^4) = 106$ e $C({10}^6) = 11.845$. -Find $C({10}^{17})$. +Encontre $C({10}^{17})$. # --hints-- -`crisscrossEllipses()` should return `1199215615081353`. +`crisscrossEllipses()` deve retornar `1199215615081353`. ```js assert.strictEqual(crisscrossEllipses(), 1199215615081353); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-438-integer-part-of-polynomial-equations-solutions.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-438-integer-part-of-polynomial-equations-solutions.md index 05c8bd7d4a5..9f9544d50d7 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-438-integer-part-of-polynomial-equations-solutions.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-438-integer-part-of-polynomial-equations-solutions.md @@ -1,6 +1,6 @@ --- id: 5900f5231000cf542c510034 -title: 'Problem 438: Integer part of polynomial equation''s solutions' +title: 'Problema 438: Parte inteira das soluções da equação polinomial' challengeType: 1 forumTopicId: 302109 dashedName: problem-438-integer-part-of-polynomial-equations-solutions @@ -8,24 +8,24 @@ dashedName: problem-438-integer-part-of-polynomial-equations-solutions # --description-- -For an $n$-tuple of integers $t = (a_1, \ldots, a_n)$, let $(x_1, \ldots, x_n)$ be the solutions of the polynomial equation $x^n + a_1x^{n - 1} + a_2x^{n - 2} + \ldots + a_{n - 1}x + a_n = 0$. +Para uma tupla $n$ de números inteiros $t = (a_1, \ldots, a_n)$, considere $(x_1, \ldots, x_n)$ como as soluções da equação polinomial $x^n + a_1x^{n - 1} + a_2x^{n - 2} + \ldots + a_{n - 1}x + a_n = 0$. -Consider the following two conditions: +Considere as duas condições a seguir: -- $x_1, \ldots, x_n$ are all real. -- If $x_1, ..., x_n$ are sorted, $⌊x_i⌋ = i$ for $1 ≤ i ≤ n$. ($⌊·⌋:$ floor function.) +- $x_1, \ldots, x_n$ são todos reais. +- Se $x_1, ..., x_n$ estiverem ordenados, $⌊x_i⌋ = i$ para $1 ≤ i ≤ n$. ($⌊·⌋:$ função de piso.) -In the case of $n = 4$, there are 12 $n$-tuples of integers which satisfy both conditions. +No caso de $n = 4$, há 12 tuplas $n$ de números inteiros que satisfazem ambas as condições. -We define $S(t)$ as the sum of the absolute values of the integers in $t$. +Definimos $S(t)$ como a soma de valores absolutos dos números inteiros em $t$. -For $n = 4$ we can verify that $\sum S(t) = 2087$ for all $n$-tuples $t$ which satisfy both conditions. +Para $n = 4$ podemos verificar que $\sum S(t) = 2087$ para todas as tuplas $n$ $t$ que satisfazem ambas as condições. -Find $\sum S(t)$ for $n = 7$. +Encontre a $\sum S(t)$ para $n = 7$. # --hints-- -`polynomialIntegerPart()` should return `2046409616809`. +`polynomialIntegerPart()` deve retornar `2046409616809`. ```js assert.strictEqual(polynomialIntegerPart(), 2046409616809); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-468-smooth-divisors-of-binomial-coefficients.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-468-smooth-divisors-of-binomial-coefficients.md index dbd4119b933..b4bc330565b 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-468-smooth-divisors-of-binomial-coefficients.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-468-smooth-divisors-of-binomial-coefficients.md @@ -1,6 +1,6 @@ --- id: 5900f5411000cf542c510054 -title: 'Problem 468: Smooth divisors of binomial coefficients' +title: 'Problema 468: Divisores harmonizados de coeficientes binomiais' challengeType: 1 forumTopicId: 302143 dashedName: problem-468-smooth-divisors-of-binomial-coefficients @@ -8,27 +8,27 @@ dashedName: problem-468-smooth-divisors-of-binomial-coefficients # --description-- -An integer is called B-smooth if none of its prime factors is greater than $B$. +Um inteiro é chamado de harmonizado de B se nenhum de seus fatores primos é maior que $B$. -Let $SB(n)$ be the largest B-smooth divisor of $n$. +Considere $SB(n)$ como o maior divisor harmonizado de B de $n$. -Examples: +Exemplos: $$\begin{align} & S_1(10) = 1 \\\\ - & S_4(2\\,100) = 12 \\\\ & S_{17}(2\\,496\\,144) = 5\\,712 \end{align}$$ + & S_4(2.100) = 12 \\\\ & S_{17}(2.496.144) = 5.712 \end{align}$$ -Define $F(n) = \displaystyle\sum_{B = 1}^n \sum_{r = 0}^n S_B(\displaystyle\binom{n}{r})$. Here, $\displaystyle\binom{n}{r}$ denotes the binomial coefficient. +Defina $F(n) = \displaystyle\sum_{B = 1}^n \sum_{r = 0}^n S_B(\displaystyle\binom{n}{r})$. Aqui, $\displaystyle\binom{n}{r}$ denota o coeficiente binomial. -Examples: +Exemplos: $$\begin{align} & F(11) = 3132 \\\\ - & F(1\\,111)\bmod 1\\,000\\,000\\,993 = 706\\,036\\,312 \\\\ & F(111\\,111)\bmod 1\\,000\\,000\\,993 = 22\\,156\\,169 \end{align}$$ + & F(1.111)\bmod 1.000.000.993 = 706.036.312 \\\\ & F(111.111)\bmod 1.000.000.993 = 22.156.169 \end{align}$$ -Find $F(11\\,111\\,111)\bmod 1\\,000\\,000\\,993$. +Encontre $F(11.111.111)\bmod 1.000.000.993$. # --hints-- -`smoothDivisorsOfBinomialCoefficients()` should return `852950321`. +`smoothDivisorsOfBinomialCoefficients()` deve retornar `852950321`. ```js assert.strictEqual(smoothDivisorsOfBinomialCoefficients(), 852950321); diff --git a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-480-the-last-question.md b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-480-the-last-question.md index b07b59bb692..84c7e85d38e 100644 --- a/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-480-the-last-question.md +++ b/curriculum/challenges/portuguese/18-project-euler/project-euler-problems-401-to-480/problem-480-the-last-question.md @@ -1,6 +1,6 @@ --- id: 5900f54c1000cf542c51005f -title: 'Problem 480: The Last Question' +title: 'Problema 480: A última pergunta' challengeType: 1 forumTopicId: 302158 dashedName: problem-480-the-last-question @@ -8,13 +8,13 @@ dashedName: problem-480-the-last-question # --description-- -Consider all the words which can be formed by selecting letters, in any order, from the phrase: +Considere todas as palavras que podem ser formadas selecionando letras, em qualquer ordem, a partir da frase: $$\mathbf{\text{thereisasyetinsufficientdataforameaningfulanswer}}$$ -Suppose those with 15 letters or less are listed in alphabetical order and numbered sequentially starting at 1. +Suponha que aquelas com 15 letras ou menos estão listadas em ordem alfabética e numeradas sequencialmente a partir de 1. -The list would include: +A lista incluiria: $$\begin{align} & 1: \text{a} \\\\ & 2: \text{aa} \\\\ & 3: \text{aaa} \\\\ @@ -32,31 +32,31 @@ $$\begin{align} & 1: \text{a} \\\\ & ... \\\\ & 525069350231428029: \text{ywuuttttssssrrr} \\\\ \end{align}$$ -Define $P(w)$ as the position of the word $w$. +Defina $P(w)$ como a posição da palavra $w$. -Define $W(p)$ as the word in position $p$. +Defina $W(p)$ como a palavra na posição $p$. -We can see that $P(w)$ and $W(p)$ are inverses: $P(W(p)) = p$ and $W(P(w)) = w$. +Podemos ver que $P(w)$ e $W(p)$ são inversos: $P(W(p)) = p$ e $W(P(w)) = w$. -Examples: +Exemplos: $$\begin{align} & W(10) = \text{ aaaaaacdee} \\\\ & P(\text{aaaaaacdee}) = 10 \\\\ & W(115246685191495243) = \text{ euler} \\\\ & P(\text{euler}) = 115246685191495243 \\\\ \end{align}$$ -Find $$W(P(\text{legionary}) + P(\text{calorimeters}) - P(\text{annihilate}) + P(\text{orchestrated}) - P(\text{fluttering})).$$ +Encontre $$W(P(\text{legionary}) + P(\text{calorimeters}) - P(\text{annihilate}) + P(\text{orchestrated}) - P(\text{fluttering})).$$ -Give your answer using lowercase characters (no punctuation or space). +Dê sua resposta usando caracteres em minúsculas (sem pontuação nem espaço). # --hints-- -`euler480()` should return a string. +`euler480()` deve retornar uma string. ```js assert(typeof euler480() === 'string'); ``` -`euler480()` should return the string `turnthestarson`. +`euler480()` deve retornar a string `turnthestarson`. ```js assert.strictEqual(euler480(), 'turnthestarson'); diff --git a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md index cb148bd821d..9efd53ad9c9 100644 --- a/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md +++ b/curriculum/challenges/ukrainian/02-javascript-algorithms-and-data-structures/basic-javascript/record-collection.md @@ -22,7 +22,7 @@ Complete the function using the rules below to modify the object passed to the f - Your function must always return the entire `records` object. - If `value` is an empty string, delete the given `prop` property from the album. - If `prop` isn't `tracks` and `value` isn't an empty string, assign the `value` to that album's `prop`. -- If `prop` is `tracks` and value isn't an empty string, add the `value` to the end of the album's `tracks` array. You need to create this array first if the album does not have a `tracks` property. +- If `prop` is `tracks` and `value` isn't an empty string, you need to update the album's `tracks` array. First, if the album does not have a `tracks` property, assign it an empty array. Then add the `value` as the last item in the album's `tracks` array. **Note:** A copy of the `recordCollection` object is used for the tests. You should not directly modify the `recordCollection` object.