mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-19 10:07:46 -05:00
chore(i18n,learn): processed translations (#49930)
This commit is contained in:
@@ -26,7 +26,13 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
You've seen several of these methods before. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and uses the `true` Boolean to make it asynchronous. The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header. Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. The document's HTML can be updated. Finally, the `send` method sends the request with the `body` value, which the `userName` key was given by the user in the `input` field.
|
||||
You've seen several of these methods before. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -25,14 +25,12 @@ assert($('input[type="checkbox"]')[0]);
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
يجب ألا يكون النص `Loving` موجودا مباشرة علي يمين خانة الاختيار الخاصة بك. يجب تغليفه في عنصر `label`. تأكد من وجود مسافة بين العنصرين.
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
你之前已經見過這些方法。 `open` 方法將對外部資源的給定 URL 的請求初始化爲 `POST`,並使用 `true` 布爾值使其變成異步的。 `setRequestHeader` 方法設置了 HTTP 請求標頭的值,該標頭包含有關發送人和請求的信息。 它必須在 `open` 方法之後、`send` 方法之前調用。 它的兩個參數表示標頭的內容類型和標頭數據將被設置成什麼值。 接下來,`onreadystatechange` 事件監聽器監聽請求狀態的更改。 `readyState` 爲 `4`,表示操作已完成。`status` 爲 `201`,表示請求成功。 文檔的 HTML 可以更新。 最後,`send` 方法發送帶有 `body` 值的請求,其中 `userName` 的值由用戶在 `input` 字段中輸入。
|
||||
你之前已經見過這些方法。 Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
更新代碼,創建並向 API 發送 `POST` 請求。 然後在輸入框中輸入你的姓名,並點擊 `Send Message`。 你的 AJAX 函數會用服務器返回的數據替換 `Reply from Server will be here.`。 修改返回的請求結果,在你的名字後面添加 `loves cats`。
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
應該創建一個新的 `XMLHttpRequest`。
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
應該使用 `open` 方法初始化一個發送給服務器的 `POST` 請求。
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
應該使用 `setRequestHeader` 方法。
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
應該有一個 `onreadystatechange` 的事件監聽器。
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
應該獲取 class 爲 `message` 的元素,並將它的 `textContent` 更改爲 `userName loves cats`。
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
應該使用 `send` 方法。
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ assert($('input[type="checkbox"]')[0]);
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
文本 `Loving` 不應再直接位於複選框的右側。 它應該被包裹在 `label` 元素中。 確保兩個元素之間有空格。
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
你之前已经见过这些方法。 `open` 方法将对外部资源的给定 URL 的请求初始化为 `POST`,并使用 `true` 布尔值使其变成异步的。 `setRequestHeader` 方法设置了 HTTP 请求标头的值,该标头包含有关发送人和请求的信息。 它必须在 `open` 方法之后、`send` 方法之前调用。 它的两个参数表示标头的内容类型和标头数据将被设置成什么值。 接下来,`onreadystatechange` 事件监听器监听请求状态的更改。 `readyState` 为 `4`,表示操作已完成。`status` 为 `201`,表示请求成功。 文档的 HTML 可以更新。 最后,`send` 方法发送带有 `body` 值的请求,其中 `userName` 的值由用户在 `input` 字段中输入。
|
||||
你之前已经见过这些方法。 Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
更新代码,创建并向 API 发送 `POST` 请求。 然后在输入框中输入你的姓名,并点击 `Send Message`。 你的 AJAX 函数会用服务器返回的数据替换 `Reply from Server will be here.`。 修改返回的请求结果,在你的名字后面添加 `loves cats`。
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
应该创建一个新的 `XMLHttpRequest`。
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
应该使用 `open` 方法初始化一个发送给服务器的 `POST` 请求。
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
应该使用 `setRequestHeader` 方法。
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
应该有一个 `onreadystatechange` 的事件监听器。
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
应该获取 class 为 `message` 的元素,并将它的 `textContent` 更改为 `userName loves cats`。
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
应该使用 `send` 方法。
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ assert($('input[type="checkbox"]')[0]);
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
文本 `Loving` 不应再直接位于复选框的右侧。 它应该被包裹在 `label` 元素中。 确保两个元素之间有空格。
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
Ya has visto varios de estos métodos anteriormente. Aquí el método `open` inicializa la solicitud como un `POST` a la URL dada del recurso externo, y utiliza el `true` booleano para hacerlo asincrónico. El método `setRequestHeader` establece el valor de un encabezado de solicitud HTTP, que contiene información sobre el remitente y la solicitud. Debe ser llamado después del método `open`, pero antes del método `send`. Los dos parámetros son el nombre de encabezado y el valor a establecer como el cuerpo de ese encabezado. A continuación, el detector de eventos `onreadystatechange` maneja un cambio en el estado de la solicitud. Un `readyState` de `4` significa que la operación está completa, y un `status` de `201` significa que fue una solicitud exitosa. El HTML del documento puede ser actualizado. Finalmente, el método `send` envía la solicitud con el valor `body`. que la clave `userName` fue dada por el usuario en el campo `input`.
|
||||
Ya has visto varios de estos métodos anteriormente. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Actualiza el código para que hagas una solicitud `POST` al endpoint de la API. Luego escribe tu nombre en el campo de entrada y haz clic en `Send Message`. Tu función AJAX debe reemplazar `Reply from Server will be here.` con los datos del servidor. Formatea la respuesta para mostrar tu nombre adjuntado con el texto `loves cats`.
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
Tu código debe crear un nuevo `XMLHttpRequest`.
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
Tu código debe utilizar el método `open` para inicializar una solicitud `POST` a la API de foto del gato de freeCodeCamp.
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
Tu código debe utilizar el método `setRequestHeader`.
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Tu código debe tener un manejador de eventos `onreadystatechange` establecido a una función.
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
Tu código debe obtener el elemento con la clase `message` y cambiar su `textContent` a `userName loves cats`
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Tu código debe usar el método `send`.
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ Tu checkbox, aún debe tener un atributo `id` con el valor `loving`. Se esperab
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
El texto `Loving` ya no debe estar inmediatamente a la derecha de tu checkbox. Debe estar anidado dentro de un elemento `label`. Asegúrate de que hay un espacio entre los dos elementos.
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -25,13 +25,13 @@ FirstLine
|
||||
ThirdLine
|
||||
</pre>
|
||||
|
||||
You will need to use escape sequences to insert special characters correctly. You will also need to follow the spacing as it looks above, with no spaces between escape sequences or words.
|
||||
Um Sonderzeichen korrekt einzufügen, musst du Escape-Sequenzen verwenden. Du musst auch die Abstände so einhalten, wie sie oben aussehen, ohne Leerzeichen zwischen Escape-Sequenzen oder Wörtern.
|
||||
|
||||
**Note:** The indentation for `SecondLine` is achieved with the tab escape character, not spaces.
|
||||
**Hinweis:** Die Einrückung für `SecondLine` wird mit dem Tabulator-Escape-Zeichen erreicht, nicht mit Leerzeichen.
|
||||
|
||||
# --hints--
|
||||
|
||||
`myStr` should not contain any spaces
|
||||
`myStr` sollte keine Leerzeichen enthalten
|
||||
|
||||
```js
|
||||
assert(!/ /.test(myStr));
|
||||
@@ -69,7 +69,7 @@ There should be a newline character between `SecondLine` and `ThirdLine`
|
||||
assert(/SecondLine\nThirdLine/.test(myStr));
|
||||
```
|
||||
|
||||
`myStr` should only contain characters shown in the instructions
|
||||
`myStr` sollte nur die in der Anleitung angegebenen Zeichen enthalten
|
||||
|
||||
```js
|
||||
assert(myStr === 'FirstLine\n\t\\SecondLine\nThirdLine');
|
||||
|
||||
@@ -18,7 +18,7 @@ let myStr = "Bob";
|
||||
myStr[0] = "J";
|
||||
```
|
||||
|
||||
Note that this does *not* mean that `myStr` could not be re-assigned. The only way to change `myStr` would be to assign it with a new value, like this:
|
||||
Beachte, dass dies *nicht* bedeutet, dass `myStr` kein neuer Wert zugewiesen werden kann. Die einzige Möglichkeit, `myStr` zu ändern, wäre, ihr einen neuen Wert zuzuweisen, etwa so:
|
||||
|
||||
```js
|
||||
let myStr = "Bob";
|
||||
|
||||
@@ -30,7 +30,7 @@ const value = "title";
|
||||
const valueLookup = article[value];
|
||||
```
|
||||
|
||||
`articleAuthor` is the string `Kaashan Hussain`, `articleLink` is the string `https://www.freecodecamp.org/news/a-complete-guide-to-creating-objects-in-javascript-b0e2450655e8/`, and `valueLookup` is the string `How to create objects in JavaScript`.
|
||||
`articleAuthor` ist `Kaashan Hussain`, `articleLink` ist `https://www.freecodecamp.org/news/a-complete-guide-to-creating-objects-in-javascript-b0e2450655e8/` und `valueLookup` ist `How to create objects in JavaScript`. Es handelt sich jeweils um Stringwerte.
|
||||
|
||||
# --instructions--
|
||||
|
||||
|
||||
@@ -22,11 +22,11 @@ console.log(arr);
|
||||
|
||||
Die Konsole würde die Werte `1, 2` und `[3, 4, 5, 7]` anzeigen.
|
||||
|
||||
Die Variablen `a` und `b` entnehmen den ersten und zweiten Wert aus dem Array. Danach erhält `arr` aufgrund des Vorhandenseins der Rest-Syntax die restlichen Werte in Form eines Arrays. Das Rest-Element funktioniert nur als letzte Variable in der Liste richtig. As in, you cannot use the rest syntax to catch a subarray that leaves out the last element of the original array.
|
||||
Die Variablen `a` und `b` entnehmen den ersten und zweiten Wert aus dem Array. Danach erhält `arr` aufgrund des Vorhandenseins der Rest-Syntax die restlichen Werte in Form eines Arrays. Das Rest-Element funktioniert nur als letzte Variable in der Liste richtig. Das bedeutet, dass du die Rest-Syntax nicht verwenden kannst, um ein Subarray zu erfassen, das das letzte Element des ursprünglichen Arrays auslässt.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Use a destructuring assignment with the rest syntax to emulate the behavior of `Array.prototype.slice()`. `removeFirstTwo()` should return a sub-array of the original array `list` with the first two elements omitted.
|
||||
Verwende eine Destrukturierungszuweisung mit der Rest-Syntax, um das Verhalten von `Array.prototype.slice()` zu emulieren. `removeFirstTwo()` sollte ein Subarray des ursprünglichen Arrays `list` zurückgeben, wobei die ersten beiden Elemente weggelassen werden.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Aber zuerst wollen wir ein paar funktionale Begriffe klären:
|
||||
|
||||
Funktionen, die einer Variable zugewiesen, an eine andere Funktion übergeben oder von einer anderen Funktion zurückgegeben werden können, werden <dfn>Funktionen erster Klasse</dfn> genannt. Alle Funktionen in JavaScript sind Funktionen erster Klasse.
|
||||
|
||||
The functions that take a function as an argument, or return a function as a return value, are called <dfn>higher order</dfn> functions.
|
||||
Die Funktionen, die eine Funktion als Argument akzeptieren oder eine Funktion als Rückgabewert zurückgeben, werden Funktionen <dfn>höherer Ordnung</dfn> genannt.
|
||||
|
||||
Wenn Funktionen an eine andere Funktion übergeben oder von einer anderen Funktion zurückgegeben werden, dann können die übergebenen oder zurückgegebenen Funktionen als <dfn>Lambda</dfn> bezeichnet werden.
|
||||
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
Du hast bereits mehrere dieser Methoden gesehen. Hier initialisiert die `open`-Methode die Anfrage als `POST` an die angegebene URL der externen Ressource und verwendet den `true` Boolean, um es asynchron zu gestalten. Die Methode `setRequestHeader` setzt den Wert eines HTTP-Request-Headers, der Informationen über den Absender und die Anfrage enthält. Es muss nach der `open`-Methode aufgerufen werden, aber noch vor der `send`-Methode. Die beiden Parameter sind der Name des Headers und der Wert, der als der Körper des Headers gesetzt werden soll. Als nächstes bearbeitet der `onreadystatechange` Event-Listener eine Änderung des Status der Abfrage. Ein `readyState` von `4` bedeutet, dass die Operation abgeschlossen ist und ein `status` von `201` bedeutet, dass es eine erfolgreiche Anfrage war. Der HTML-Code des Dokuments kann aktualisiert werden. Schließlich sendet die `send`-Methode eine Anfrage mit dem `body` Wert, dessen `userName`-Schlüssel vom Nutzer im `input`-Feld gegeben wurde.
|
||||
Du hast bereits mehrere dieser Methoden gesehen. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Aktualisiere den Code, damit er eine `POST`-Anfrage an den API-Endpunkt stellt. Gib dann deinen Namen in das Eingabefeld ein und klicke auf `Send Message`. Deine AJAX Funktion sollte `Reply from Server will be here.` durch Daten vom Server ersetzen. Formatiere die Antwort so, dass dein Name zusammen mit dem Text `loves cats` angezeigt wird.
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
Dein Code sollte eine neue `XMLHttpRequest` erstellen.
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
Dein Code sollte die `open`-Methode verwenden, um eine `POST`-Anfrage an den Server zu senden.
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
Dein Code sollte die `setRequestHeader`-Methode verwenden.
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Dein Code sollte einen `onreadystatechange` Event-Handler auf eine Funktion gesetzt haben.
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
Dein Code sollte das Element mit der Klasse `message` erhalten und dessen `textContent` zu `userName loves cats` ändern
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Dein Code sollte die `send`-Methode verwenden.
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ Your checkbox should still have an `id` attribute with the value `loving`. Expe
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
The text `Loving` should no longer be located directly to the right of your checkbox. It should be wrapped in a `label` element. Make sure there is a space between the two elements.
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -7,16 +7,16 @@ isPrivate: true
|
||||
tests:
|
||||
-
|
||||
id: 63d83ff239c73468b059cd3f
|
||||
title: Build a Multi-Function Calculator
|
||||
title: Crea una Calcolatrice Multifunzione
|
||||
-
|
||||
id: 63d83ffd39c73468b059cd40
|
||||
title: Build a Graphing Calculator
|
||||
title: Crea una Calcolatrice Grafica
|
||||
-
|
||||
id: 63d8401039c73468b059cd41
|
||||
title: Build Three Math Games
|
||||
title: Crea Tre Giochi di Matematica
|
||||
-
|
||||
id: 63d8401e39c73468b059cd42
|
||||
title: Build a Financial Calculator
|
||||
title: Crea un Calcolatrice Finanziaria
|
||||
-
|
||||
id: 63d8402e39c73468b059cd43
|
||||
title: Build a Data Graph Explorer
|
||||
title: Crea un Data Graph Explorer
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
Hai già visto molti di questi metodi. Qui il metodo `open` inizializza la richiesta come `POST` all'URL specificato della risorsa esterna, e usa il booleano `true` per renderlo asincrono. Il metodo `setRequestHeader` imposta il valore di un'intestazione di richiesta HTTP, che contiene informazioni sul mittente e sulla richiesta. Deve essere chiamato dopo il metodo `open`, ma prima del metodo `send`. I due parametri sono il nome dell'intestazione e il valore da impostare come corpo di quell'intestazione. Successivamente, il listener dell'evento `onreadystatechange` gestisce un cambiamento nello stato della richiesta. Un `readyState` di `4` significa che l'operazione è completata, e uno `status` di `201` significa che la richiesta ha avuto successo. L'HTML del documento può essere aggiornato. Infine, il metodo `send` invia la richiesta con il valore `body`, nel quale la chiave `userName` è stata data dall'utente nel campo `input`.
|
||||
Hai già visto molti di questi metodi. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Aggiornare il codice in modo da fare una richiesta `POST` all'endpoint API. Quindi digita il nome nel campo di input e fai click su `Send Message`. La tua funzione AJAX dovrebbe sostituire `Reply from Server will be here.` con i dati dal server. Formatta la risposta per mostrare il tuo nome con l'aggiunta del testo `loves cats`.
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
Il tuo codice dovrebbe creare una nuova `XMLHttpRequest`.
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
Il tuo codice dovrebbe utilizzare il metodo `open` per inizializzare una richiesta `POST` al server.
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
Il tuo codice dovrebbe utilizzare il metodo `setRequestHeader`.
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Il tuo codice dovrebbe avere un gestore di eventi `onreadystatechange` impostato a una funzione.
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
Il tuo codice dovrebbe ottenere l'elemento di classe `message` e cambiare il suo `textContent` a `userName loves cats`
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Il tuo codice dovrebbe usare il metodo `send`.
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -48,7 +48,7 @@ Non ci dovrebbe essere una query URL. Senza un nome nella query URL, l'endpoint
|
||||
|
||||
# --hints--
|
||||
|
||||
All tests should pass
|
||||
Tutti i test dovrebbero essere superati
|
||||
|
||||
```js
|
||||
(getUserInput) =>
|
||||
@@ -62,7 +62,7 @@ All tests should pass
|
||||
);
|
||||
```
|
||||
|
||||
You should test for `res.status` == 200
|
||||
Dovresti verificare che `res.status` == 200
|
||||
|
||||
```js
|
||||
(getUserInput) =>
|
||||
@@ -78,7 +78,7 @@ You should test for `res.status` == 200
|
||||
);
|
||||
```
|
||||
|
||||
You should test for `res.text` == `'hello Guest'`
|
||||
Dovresti verificare che `res.text` == `'hello Guest'`
|
||||
|
||||
```js
|
||||
(getUserInput) =>
|
||||
|
||||
@@ -25,14 +25,12 @@ La casella di spunta dovrebbe ancora avere un attributo `id` con il valore `lovi
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
Il testo `Loving` non dovrebbe essere più posizionato direttamente a destra della tua casella di spunta. Dovrebbe essere contenuto in un elemento `label`. Assicurati che ci sia uno spazio tra i due elementi.
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -9,7 +9,7 @@ dashedName: step-31
|
||||
|
||||
La proprietà CSS `clip` è usata per definire la porzione visibile di un elemento. Imposta il selettore `span[class~="sr-only"]` per avere una proprietà `clip` di `rect(1px, 1px, 1px, 1px, 1px)`.
|
||||
|
||||
La proprietà `clip-path` determina la forma che la proprietà `clip` dovrebbe assumere. Set the `clip-path` property to the value of `inset(50%)`, forming the clip-path into a rectangle within the element.
|
||||
La proprietà `clip-path` determina la forma che la proprietà `clip` dovrebbe assumere. Imposta la proprietà `clip-path` con il valore di `inset(50%)`, ritagliando un rettangolo all'interno dell'elemento.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -35,49 +35,49 @@ const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?
|
||||
assert(text.includes('clip-path: inset(50%) !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `height` property set to `1px !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `height` con il valore `1px !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
assert(text.includes('height: 1px !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `width` property set to `1px !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `width` con il valore `1px !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
assert(text.includes('width: 1px !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `position` property set to `absolute !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `position` con il valore `absolute !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
assert(text.includes('position: absolute !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `overflow` property set to `hidden !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `overflow` con il valore `hidden !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
assert(text.includes('overflow: hidden !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `white-space` property set to `nowrap !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `white-space` con il valore `nowrap !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
assert(text.includes('white-space: nowrap !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `padding` property set to `0 !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `padding` con il valore `0 !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
assert(text.includes('padding: 0px !important;'));
|
||||
```
|
||||
|
||||
Your `span[class~="sr-only"]` selector should have the `margin` property set to `-1px !important`.
|
||||
Il selettore `span[class~="sr-only"]` dovrebbe avere la proprietà `margin` con il valore `-1px !important`.
|
||||
|
||||
```js
|
||||
const text = new __helpers.CSSHelp(document).getStyle('span[class~="sr-only"]')?.cssText;
|
||||
|
||||
@@ -15,16 +15,16 @@ After going to that link, create a copy of the notebook either in your own accou
|
||||
|
||||
For this challenge, you need to create a multi-function calculator using Python that take input and do the following:
|
||||
|
||||
- Get a .csv file in three ways
|
||||
- uploading it from the local computer
|
||||
- getting a url from user input
|
||||
- putting the url in the code
|
||||
- Use the Pandas library to save the .csv as a dataframe
|
||||
- Print headings and the first two rows
|
||||
- Store the column names as a list
|
||||
- Choose one or two columns and convert the data to Numpy arrays
|
||||
- Display data as a scatter plot or a line graph
|
||||
- Be able to do this for different column combinations, and interpret the graphs
|
||||
- Ottenere un file .csv in tre modi
|
||||
- caricandolo dal computer locale
|
||||
- ottenendo un url dall'input dell'utente
|
||||
- inserendo l'url nel codice
|
||||
- Usare la libreria di Pandas per salvare il .csv come dataframe
|
||||
- Stampare le intestazioni e le prime due righe
|
||||
- Memorizzare i nomi delle colonne come lista
|
||||
- Scegliere una o due colonne e convertire i dati in array Numpy
|
||||
- Mostrare i dati come un grafico a dispersione o un grafico a linea
|
||||
- Essere in grado di fare tutto ciò per diverse combinazioni di colonne e interpretare i grafici
|
||||
|
||||
Once you're done, submit the URL to the public Colab notebook on your Google drive.
|
||||
|
||||
|
||||
@@ -15,12 +15,12 @@ After going to that link, create a copy of the notebook either in your own accou
|
||||
|
||||
For this challenge, you need to create a multi-function calculator using Python that take input and do the following:
|
||||
|
||||
- Calculate annuity with monthly or continuous growth
|
||||
- Calculate monthly mortgage payment
|
||||
- Estimate retirement investment balance
|
||||
- Determine how long until an amount doubles, given the rate
|
||||
- Solve logarithmic equations
|
||||
- Convert to (and from) scientific notation
|
||||
- Calcolare la rendita con crescita mensile o continua
|
||||
- Calcolare la rata mensile di un mutuo
|
||||
- Stimare il saldo del fondo pensione
|
||||
- Determinare dopo quanto tempo una somma raddoppia, dato il tasso
|
||||
- Risolvere equazioni logaritmiche
|
||||
- Convertire in (e da) notazione scientifica
|
||||
|
||||
If you are struggling, you can follow the <a href="https://www.youtube.com/embed/c2AhGd6srJ0" target="_blank" rel="noopener noreferrer nofollow">video walkthrough for this project.</a>
|
||||
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
---
|
||||
id: 63d83ffd39c73468b059cd40
|
||||
title: "Build a Graphing Calculator"
|
||||
title: "Crea una Calcolatrice Grafica"
|
||||
challengeType: 10
|
||||
dashedName: build-a-graphing-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
You will be <a href="https://colab.research.google.com/drive/1BHKshb67jWVVZQ9VlzQOpdFA-gzJkSUF?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">working on this project with Google Colaboratory</a>.
|
||||
Lavorerai a <a href="https://colab.research.google.com/drive/1BHKshb67jWVVZQ9VlzQOpdFA-gzJkSUF?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">questo progetto con Google Colaboratory</a>.
|
||||
|
||||
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
|
||||
Dopo aver visitato il link, crea una copia del notebook nel tuo account o localmente. Una volta completato il progetto e superato il test (incluso in quel link), invia il link del progetto qui sotto. Se stai inviando un link di Google Colaboratory, assicurati di attivare la condivisione del link per "anyone with the link"
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create a graphing calculator using Python that can take input and do the following:
|
||||
Per questa sfida, usando Python devi creare una calcolatrice grafica che prende un input ed esegue le seguenti operazioni:
|
||||
|
||||
- Graph one or more functions
|
||||
- Create a table of (x,y) values
|
||||
- Graficare una o più funzioni
|
||||
- Creare una tabella di valori (x,y)
|
||||
- Shade above or below the line
|
||||
- Solve and graph a system of equations
|
||||
- Zoom in or out on a graph
|
||||
- Solve quadratic equations
|
||||
- Risolvere e graficare un sistema di equazioni
|
||||
- Zoomare avanti o indietro su un grafico
|
||||
- Risolvere equazioni quadratiche
|
||||
|
||||
If you are struggling, you can follow the <a href="https://www.youtube.com/embed/EM0yNdZBdfQ" target="_blank" rel="noopener noreferrer nofollow">video walkthrough for this project.</a>
|
||||
Se stai facendo fatica, puoi seguire la <a href="https://www.youtube.com/embed/EM0yNdZBdfQ" target="_blank" rel="noopener noreferrer nofollow">guida per questo progetto.</a>
|
||||
|
||||
Once you're done, submit the URL to the public Colab notebook on your Google drive.
|
||||
Quando hai finito, invia l'URL al notebook Colab pubblico sul tuo Google drive.
|
||||
|
||||
|
||||
@@ -1,28 +1,28 @@
|
||||
---
|
||||
id: 63d83ff239c73468b059cd3f
|
||||
title: "Build a Multi-Function Calculator"
|
||||
title: "Crea una Calcolatrice Multifunzione"
|
||||
challengeType: 10
|
||||
dashedName: build-a-multi-function-calculator
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
You will be <a href="https://colab.research.google.com/drive/1jT7atuRCOnkdPyDmlgKVJqxouDSx7Ioh?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">working on this project with Google Colaboratory</a>.
|
||||
Lavorerai a <a href="https://colab.research.google.com/drive/1jT7atuRCOnkdPyDmlgKVJqxouDSx7Ioh?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">questo progetto con Google Colaboratory</a>.
|
||||
|
||||
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
|
||||
Dopo aver visitato il link, crea una copia del notebook nel tuo account o localmente. Una volta completato il progetto e superato il test (incluso in quel link), invia il link del progetto qui sotto. Se stai inviando un link di Google Colaboratory, assicurati di attivare la condivisione del link per "anyone with the link"
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create a multi-function calculator using Python that take input and do the following:
|
||||
Per questa sfida, usando Python devi creare una calcolatrice multifunzione che prende un input ed esegue le seguenti operazioni:
|
||||
|
||||
- solve proportions
|
||||
- solve for x in equations
|
||||
- risolvere proporzioni
|
||||
- risolvere equazioni per x
|
||||
- factor square roots
|
||||
- convert decimals to fractions and percents
|
||||
- convert fractions to decimals and percents
|
||||
- convert percents to decimals and fractions
|
||||
- convertire decimali in frazioni e percentuali
|
||||
- convertire le frazioni in decimali e percentuali
|
||||
- convertire percentuali in decimali e frazioni
|
||||
|
||||
If you are struggling, you can follow the <a href="https://www.youtube.com/embed/PdsvcZNPEEs" target="_blank" rel="noopener noreferrer nofollow">video walkthrough for this project.</a>
|
||||
Se stai facendo fatica, puoi seguire la <a href="https://www.youtube.com/embed/PdsvcZNPEEs" target="_blank" rel="noopener noreferrer nofollow">guida per questo progetto.</a>
|
||||
|
||||
Once you're done, submit the URL to the public Colab notebook on your Google drive.
|
||||
Quando hai finito, invia l'URL al notebook Colab pubblico sul tuo Google drive.
|
||||
|
||||
|
||||
@@ -1,29 +1,29 @@
|
||||
---
|
||||
id: 63d8401039c73468b059cd41
|
||||
title: "Build Three Math Games"
|
||||
title: "Crea Tre Giochi di Matematica"
|
||||
challengeType: 10
|
||||
dashedName: build-three-math-games
|
||||
---
|
||||
|
||||
# --description--
|
||||
|
||||
You will be <a href="https://colab.research.google.com/#create=true" target="_blank" rel="noopener noreferrer nofollow">working on this project with Google Colaboratory</a>.
|
||||
Lavorerai a <a href="https://colab.research.google.com/#create=true" target="_blank" rel="noopener noreferrer nofollow">questo progetto con Google Colaboratory</a>.
|
||||
|
||||
After going to that link, create a copy of the notebook either in your own account or locally. Once you complete the project and it passes the test (included at that link), submit your project link below. If you are submitting a Google Colaboratory link, make sure to turn on link sharing for "anyone with the link."
|
||||
Dopo aver visitato il link, crea una copia del notebook nel tuo account o localmente. Una volta completato il progetto e superato il test (incluso in quel link), invia il link del progetto qui sotto. Se stai inviando un link di Google Colaboratory, assicurati di attivare la condivisione del link per "anyone with the link"
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create three math games using Python that do the following:
|
||||
Per questa sfida, utilizzando Python dovrai creare tre giochi matematici che eseguono le seguenti operazioni:
|
||||
|
||||
- Scatter plot game
|
||||
- Randomly generate points on a graph and the player has to input the (x,y) coordinates
|
||||
- For added difficulty, make the graph larger
|
||||
- Algebra practice game
|
||||
- Generate one-step and two-step problems with random integer values and the player has to input the answer
|
||||
- Use positive and negative values. For added difficulty, make the numbers larger
|
||||
- Projectile game
|
||||
- Display a "wall" with random height and location. Player has to move sliders to adjust a parabolic path to clear the wall
|
||||
- For added difficulty, make a second level where players enter a, b, and c without sliders
|
||||
- Gioco del grafico a dispersione
|
||||
- Generare punti su un grafico in modo casuale; il giocatore deve inserire le coordinate (x,y)
|
||||
- Per ulteriori difficoltà, rendere il grafico più grande
|
||||
- Gioco di pratica algebrica
|
||||
- Generare problemi di uno e due passaggi con valori interi casuali; il giocatore deve inserire la risposta
|
||||
- Utilizzare valori positivi e negativi. Per ulteriori difficoltà, rendere i numeri più grandi
|
||||
- Gioco del proiettile
|
||||
- Mostrare un "muro" con altezza e posizione casuali. Player has to move sliders to adjust a parabolic path to clear the wall
|
||||
- Per ulteriori difficoltà, creare un secondo livello dove i giocatori inseriscono a, b, e c senza cursori
|
||||
|
||||
Once you're done, submit the URL to the public Colab notebook on your Google drive.
|
||||
Quando hai finito, invia l'URL al notebook Colab pubblico sul tuo Google drive.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2959078df117ce4c408
|
||||
title: "More Resources in Colab"
|
||||
title: "Altre Risorse di Colab"
|
||||
challengeType: 15
|
||||
videoId: HNFrRHqpck4
|
||||
dashedName: more-resources-in-colab
|
||||
@@ -8,13 +8,13 @@ dashedName: more-resources-in-colab
|
||||
|
||||
# --description--
|
||||
|
||||
One more thing... This brief video will show you some of the resources available to you in Google Colab notebooks.
|
||||
Ancora una cosa... Questo breve video ti mostrerà alcune delle risorse disponibili nei notebook Google Colab.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which code snippets are available in the Google Colaboratory?
|
||||
Quali snippet di codice sono disponibili in Google Colaboratory?
|
||||
|
||||
## --answers--
|
||||
|
||||
@@ -30,7 +30,7 @@ Importing data from Google Sheets
|
||||
|
||||
---
|
||||
|
||||
All of the above
|
||||
Tutti i precedenti
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ dashedName: spreadsheets-and-additional-resources
|
||||
|
||||
# --description--
|
||||
|
||||
Let's look at how you can connect your Math and Python knowledge with external data. This video will show you how to get data from other sources, then transform it so that you can graph it and interpret it.
|
||||
Diamo un'occhiata a come puoi collegare le tue conoscenze di matematica e Python con dati esterni. Questo video ti mostrerà come ottenere dati da altre fonti, quindi trasformarli in modo da poterli graficare e interpretare.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What library helps you to read data from a .csv and store it as a dataframe where you can select columns?
|
||||
Quale libreria ti aiuta a leggere i dati da un .csv e memorizzarli in un dataframe dove puoi selezionare le colonne?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d23a9078df117ce4c3ff
|
||||
title: "Applications of Linear Systems: Extra"
|
||||
title: "Applicazioni di Sistemi Lineari: Extra"
|
||||
challengeType: 15
|
||||
videoId: ZtypoUnNdAY
|
||||
dashedName: applications-of-linear-systems-extra
|
||||
@@ -8,29 +8,29 @@ dashedName: applications-of-linear-systems-extra
|
||||
|
||||
# --description--
|
||||
|
||||
The next video contains more examples of how to set up equations and use your Colab notebook to solve them.
|
||||
Il prossimo video contiene altri esempi di come impostare le equazioni e utilizzare il tuo notebook Colab per risolverle.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
How can you make use of a Colab notebook to solve practical business problems?
|
||||
Come puoi usare un notebook Colab per risolvere problemi pratici di economia?
|
||||
|
||||
## --answers--
|
||||
|
||||
Modify the equations in the code you already wrote
|
||||
Modificando le equazioni nel codice che hai già scritto
|
||||
|
||||
---
|
||||
|
||||
Copy your existing code and then modify it as necessary
|
||||
Copiando il codice esistente e quindi modificandolo secondo necessità
|
||||
|
||||
---
|
||||
|
||||
Write new code based on the functions you already know
|
||||
Scrivendo nuovo codice basato sulle funzioni che già conosci
|
||||
|
||||
---
|
||||
|
||||
All of the above
|
||||
Tutte le precendenti
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -8,27 +8,27 @@ dashedName: word-problems
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will look at key words that tell you what math operation to use. Then you will see how to apply some of your code to different problems.
|
||||
Questo primo video tratterà le parole chiave che ti dicono quale operazione matematica usare. Poi vedrai come applicare parte del codice a problemi diversi.
|
||||
|
||||
**Here are links to the textbooks you will need to complete the assignments for this video:**
|
||||
**Ecco i link ai libri di testo che ti serviranno per completare le attività di questo video:**
|
||||
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Business Math, a Step-by-Step Handbook (2021) by Jean-Paul Oliver</a>
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Business Math, a Step-by-Step Handbook (2021) di Jean-Paul Oliver</a>
|
||||
|
||||
\- <a href="https://openstax.org/details/books/algebra-and-trigonometry" target="_blank" rel="noopener noreferrer nofollow">Algebra and Trigonometry by Jay Abramson</a>
|
||||
\- <a href="https://openstax.org/details/books/algebra-and-trigonometry" target="_blank" rel="noopener noreferrer nofollow">Algebra and Trigonometry di Jay Abramson</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the problems on pages 63, 75, 85, and 118 from "Business Math, a Step-by-Step Handbook (2021)".
|
||||
Completa i problemi alle pagine 63, 75, 85 e 118 da "Business Math, a Step-by-Step Handbook (2021)".
|
||||
|
||||
---
|
||||
|
||||
Complete the problems on pages 304, 308, and 321 from "Algebra and Trigonometry".
|
||||
Completa i problemi alle pagine 304, 308 e 321 da "Algebra and Trigonometry".
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following key words indicate subtraction?
|
||||
Quale delle seguenti parole chiave indica la sottrazione?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -10,11 +10,11 @@ dashedName: demand-and-revenue
|
||||
|
||||
In this video, you will write code to develop a demand function from two points. You will see how price affects the profit graph and how all of these equations relate to each other.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1foxkSd90q1tHCSqyY6NFAEnMfH0nNwXe?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1foxkSd90q1tHCSqyY6NFAEnMfH0nNwXe?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per questo video.</a>
|
||||
|
||||
**Here is a link to the textbook you will need to complete the assignment for this video:**
|
||||
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Business Math, a Step-by-Step Handbook (2021) by Jean-Paul Oliver</a>
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Business Math, a Step-by-Step Handbook (2021) di Jean-Paul Oliver</a>
|
||||
|
||||
# --question--
|
||||
|
||||
|
||||
@@ -10,29 +10,29 @@ dashedName: factoring
|
||||
|
||||
This first video will show you how to find common factors and divide them out - in writing, then in code using loops and modulus operations.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1tB7N3QqHEbGk33v0BdTwZTVkS9ju9yn6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1tB7N3QqHEbGk33v0BdTwZTVkS9ju9yn6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab usato in questo video.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What does the modulus (`%`) operator do in Python?
|
||||
Cosa fa l'operatore di modulo (`%`) in Python?
|
||||
|
||||
## --answers--
|
||||
|
||||
returns the percent
|
||||
restituisce la percentuale
|
||||
|
||||
---
|
||||
|
||||
divides
|
||||
divide
|
||||
|
||||
---
|
||||
|
||||
returns the remainder when dividing
|
||||
restituisce il resto della divisione
|
||||
|
||||
---
|
||||
|
||||
creates a space
|
||||
crea uno spazio
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2769078df117ce4c406
|
||||
title: "Exponents and Logarithms"
|
||||
title: "Esponenti e Logaritmi"
|
||||
challengeType: 15
|
||||
videoId: LhzmzugFFu8
|
||||
dashedName: exponents-and-logarithms
|
||||
@@ -8,13 +8,13 @@ dashedName: exponents-and-logarithms
|
||||
|
||||
# --description--
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1hg7ecxGT20B8HR2mV75HzMylj9SHIWH8?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1hg7ecxGT20B8HR2mV75HzMylj9SHIWH8?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per questo video.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What is log<sub>5</sub>(25)?
|
||||
Quanto vale log<sub>5</sub>(25)?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d258b51aeedd1a2bd649
|
||||
title: "Converting Fractions and Decimals"
|
||||
title: "Convertire Frazioni e Decimali"
|
||||
challengeType: 15
|
||||
videoId: hVHWr4KXZn0
|
||||
dashedName: converting-fractions-and-decimals
|
||||
@@ -8,19 +8,19 @@ dashedName: converting-fractions-and-decimals
|
||||
|
||||
# --description--
|
||||
|
||||
The first video will show you how to convert between fractions, decimals, and percents on paper. Then, it will show you how to do it with Python code.
|
||||
Il primo video ti mostrerà come eseguire conversioni tra frazioni, decimali e percentuali su carta. Poi, ti mostrerà come farlo con il codice Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1dgeEEODP7cwm_96_JqbjxxJhVpZcFfGe?usp=sharing#scrollTo=NkMTAVF0BlqE" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in the video.</a> Use this code as a model, and write your own code to convert fractions and decimals.
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1dgeEEODP7cwm_96_JqbjxxJhVpZcFfGe?usp=sharing#scrollTo=NkMTAVF0BlqE" target="_blank" rel="noopener noreferrer nofollow">notebook Colab notebook usato nel video.</a> Usa questo codice come modello e scrivi il tuo codice per convertire frazioni e decimali.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add the code to convert fractions and decimals to your algebra Colab notebook.
|
||||
Aggiungi il codice per convertire frazioni e decimali al tuo notebook Colab.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following correctly represents "three hundredths" as a decimal?
|
||||
Quale delle seguenti risposte rappresenta correttamente "tre centesimi" come decimale?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d260b51aeedd1a2bd64a
|
||||
title: "Fractions and Decimals: Extra"
|
||||
title: "Frazioni e Decimali: Extra"
|
||||
challengeType: 15
|
||||
videoId: YHVA6cYIglM
|
||||
dashedName: fractions-and-decimals-extra
|
||||
@@ -8,23 +8,23 @@ dashedName: fractions-and-decimals-extra
|
||||
|
||||
# --description--
|
||||
|
||||
The following video will show you one way to set up your Google Colaboratory notebook, so that you can continue to build your personalized algebra calculator.
|
||||
Il video seguente ti mostrerà un modo per impostare il tuo notebook Google Colaboratory, in modo che tu possa continuare a costruire la tua calcolatrice algebrica personalizzata.
|
||||
|
||||
Here is <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">the Colab notebook used in this video</a> so you can use it as a model.
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab usato in questo video</a> che puoi usare come modello.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add the code to factor and solve for a variable to your algebra Colab notebook.
|
||||
Aggiungi il codice per fattorizzare e risolvere per una variabile al tuo notebook Colab.
|
||||
|
||||
---
|
||||
|
||||
Run the code in the following notebook to get <a href="https://colab.research.google.com/drive/1qON4GYbMkaZJA7MYd7-RcDROOkuuBJg9?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">practice converting fractions and decimals.</a> As a bonus, look at the code used to generate the practice problems.
|
||||
Esegui il seguente notebook per fare <a href="https://colab.research.google.com/drive/1qON4GYbMkaZJA7MYd7-RcDROOkuuBJg9?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">pratica a convertire frazioni e decimali.</a> Inoltre, guarda il codice usato per generare i problemi di pratica.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following languages can you not use in Google Colaboratory?
|
||||
Quale dei seguenti linguaggi non è possibile utilizzare in Google Colaboratory?
|
||||
|
||||
## --answers--
|
||||
|
||||
@@ -36,11 +36,11 @@ LaTex
|
||||
|
||||
---
|
||||
|
||||
English
|
||||
Inglese
|
||||
|
||||
---
|
||||
|
||||
Sanskrit
|
||||
Sanscrito
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63e1798f811fda1bc546bba0
|
||||
title: "Functions and Graphing: Extra"
|
||||
title: "Funzioni e Grafici: Extra"
|
||||
challengeType: 15
|
||||
videoId: N7Fh1xKrIM4
|
||||
dashedName: functions-and-graphing-extra
|
||||
@@ -8,19 +8,19 @@ dashedName: functions-and-graphing-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This next video will show you the connection between functions and graphing. Notice how the graph is a way to represent the inputs and outputs of a function. Then the video will show you how to graph a function with Python.
|
||||
Questo video ti mostrerà la connessione tra le funzioni e i grafici. Nota come il grafico è un modo per rappresentare gli input e gli output di una funzione. Poi il video ti mostrerà come tracciare il grafico di una funzione con Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go with this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per questo video.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignemnts--
|
||||
|
||||
Add code to your algebra Colab notebook for functions and graphing.
|
||||
Aggiungi al tuo notebook Colab del codice per le funzioni e i grafici.
|
||||
|
||||
## --text--
|
||||
|
||||
What Python library would you import to create arrays that you can graph?
|
||||
Quale libreria Python importeresti per creare array che puoi graficare?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d266b51aeedd1a2bd64b
|
||||
title: "Functions"
|
||||
title: "Funzioni"
|
||||
challengeType: 15
|
||||
videoId: rYg12-omcGg
|
||||
dashedName: functions
|
||||
@@ -8,7 +8,7 @@ dashedName: functions
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will show you what it means to be a function, and then it will show you how math functions and Python functions are similar.
|
||||
Questo primo video ti mostrerà cos'è una funzione e poi ti mostrerà le somiglianze tra le funzioni matematiche e le funzioni di Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1d0e55NoKjKILIum34POv04h0OLpE_pkn" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this and the next videos.</a>
|
||||
|
||||
@@ -16,11 +16,11 @@ Here is the <a href="https://colab.research.google.com/drive/1d0e55NoKjKILIum34P
|
||||
|
||||
## --assigment--
|
||||
|
||||
Add code to your algebra Colab notebook that creates Python functions for decimal-to-fraction conversions
|
||||
Aggiungi al tuo notebook Colab del codice che crea funzioni Python per le conversioni da decimali a frazioni
|
||||
|
||||
## --text--
|
||||
|
||||
After defining a function in Python, indent each line of the function how many spaces?
|
||||
Dopo aver definito una funzione in Python, di quanti spazi indenti ogni riga della funzione?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d26fb51aeedd1a2bd64c
|
||||
title: "Graphing"
|
||||
title: "Grafici"
|
||||
challengeType: 15
|
||||
videoId: vUefCkh8-wc
|
||||
dashedName: graphing
|
||||
@@ -8,7 +8,7 @@ dashedName: graphing
|
||||
|
||||
# --description--
|
||||
|
||||
This next video will show you the connection between functions and graphing. Notice how the graph is a way to represent the inputs and outputs of a function. Then the video will show you how to graph a function with Python.
|
||||
Questo video ti mostrerà la connessione tra le funzioni e i grafici. Nota come il grafico è un modo per rappresentare gli input e gli output di una funzione. Poi il video ti mostrerà come tracciare il grafico di una funzione con Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go with the last two videos</a> so you can start making your own graphs.
|
||||
|
||||
@@ -16,15 +16,15 @@ Here is the <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9Y
|
||||
|
||||
## --assignemnts--
|
||||
|
||||
Add code to your algebra Colab notebook for functions and graphing.
|
||||
Aggiungi al tuo notebook Colab del codice per le funzioni e i grafici.
|
||||
|
||||
---
|
||||
|
||||
Run the following notebook to see <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">more ways to create graphs using algebra and Python.</a>
|
||||
Esegui il seguente notebook per scoprire <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">altri modi per creare grafici usando l'algebra e Python.</a>
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following would put a blue line on a graph?
|
||||
Quale delle seguenti righe di codice traccia una retta blu su un grafico?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d276b51aeedd1a2bd64d
|
||||
title: "Graphing Systems of Equations: Extra"
|
||||
title: "Grafici di Sistemi di Equazioni: Extra"
|
||||
challengeType: 15
|
||||
videoId: q8ad1tTFqns
|
||||
dashedName: graphing-systems-of-equations-extra
|
||||
@@ -8,31 +8,31 @@ dashedName: graphing-systems-of-equations-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This next video will give you a deeper dive into what you can do with graphing systems of equations, graphing inequalities, and shading above or below the line. You will also see how to download the graph to your computer or your Google Drive.
|
||||
This next video will give you a deeper dive into what you can do with graphing systems of equations, graphing inequalities, and shading above or below the line. Vedrai anche come scaricare il grafico sul tuo computer o su Google Drive.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1m5oG62NzUHRzBghGCPRfr1SzvbywRWPV?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1m5oG62NzUHRzBghGCPRfr1SzvbywRWPV?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab usato in questo video.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
If you want to create an interactive plot with a slider to zoom in and out, where does most of the graphing code appear?
|
||||
Se vuoi creare un grafico interattivo con un cursore per zoomare avanti e indietro, dove figura la maggior parte del codice del grafico?
|
||||
|
||||
## --answers--
|
||||
|
||||
Within the interactive() function
|
||||
All'interno della funzione interactive()
|
||||
|
||||
---
|
||||
|
||||
In the slider
|
||||
Nel cursore
|
||||
|
||||
---
|
||||
|
||||
Within the function that the interactive() calls
|
||||
All'interno della funzione che interactive() chiama
|
||||
|
||||
---
|
||||
|
||||
Before all of the functions
|
||||
Prima di tutte le funzioni
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d27db51aeedd1a2bd64e
|
||||
title: "Graphing Systems"
|
||||
title: "Grafici di Sistemi"
|
||||
challengeType: 15
|
||||
videoId: FxSIFR4zsrE
|
||||
dashedName: graphing-systems
|
||||
@@ -8,35 +8,35 @@ dashedName: graphing-systems
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will show you how to graph systems of equations with with written math, then code.
|
||||
Questo primo video ti mostrerà come graficare sistemi di equazioni con la matematica scritta e poi con il codice.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1N1JEZJctODxsntROnmg0VqMSHXYdIlFD?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1N1JEZJctODxsntROnmg0VqMSHXYdIlFD?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab usato in questo video.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add code from the video to the algebra notebook you are building, and test it with different functions.
|
||||
Aggiungi il codice dal video al notebook di algebra che stai costruendo e testalo con diverse funzioni.
|
||||
|
||||
## --text--
|
||||
|
||||
The numpy `linspace()` function takes three arguments to create an array. Which of the following arguments does it not take?
|
||||
La funzione `linspace()` di numpy prende tre argomenti per creare un array. Quale dei seguenti argomenti non accetta?
|
||||
|
||||
## --answers--
|
||||
|
||||
Minimum value
|
||||
Valore minimo
|
||||
|
||||
---
|
||||
|
||||
Maximum value
|
||||
Valore massimo
|
||||
|
||||
---
|
||||
|
||||
Number of items in the array
|
||||
Numero di elementi nell'array
|
||||
|
||||
---
|
||||
|
||||
Formula to generate each item
|
||||
Formula per generare ogni elemento
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d233b51aeedd1a2bd645
|
||||
title: "How to Solve for X: Extra"
|
||||
title: "Come Risolvere per X: Extra"
|
||||
challengeType: 15
|
||||
videoId: lFTCVUCbNoM
|
||||
dashedName: how-to-solve-for-x-extra
|
||||
@@ -8,23 +8,23 @@ dashedName: how-to-solve-for-x-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This video will go deeper, with more examples of how to use SymPy solve. It will also explain how the practice functions generate the random problems.
|
||||
Questo video sarà più approfondito, con ulteriori esempi di come utilizzare SymPy solve. Spiegherà anche come le funzioni di pratica generano i problemi casuali.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1Jv6WxW93J_1GZao8DkNb4X0D93oVibbs" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a> Use it to add more to the algebra Colab notebook that you are building.
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1Jv6WxW93J_1GZao8DkNb4X0D93oVibbs" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per seguire questo video.</a> Usalo per aggiungere altri contenuti al notebook Colab di algebra che stai costruendo.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add the code for more ways to solve for x from the video to your algebra Colab notebook.
|
||||
Aggiungi il codice per altri modi per risolvere per x dal video al tuo notebook Colab.
|
||||
|
||||
---
|
||||
|
||||
Open the following Colab notebook, run the cell, and <a href="https://colab.research.google.com/drive/1XjmHoERFKcvol7FPidQE-wgdvR82HV45" target="_blank" rel="noopener noreferrer nofollow">practice solving one and two-step algebra problems.</a> As a bonus, look at the code that generates the practice problems.
|
||||
Apri il seguente notebook Colab, esegui la cella e <a href="https://colab.research.google.com/drive/1XjmHoERFKcvol7FPidQE-wgdvR82HV45" target="_blank" rel="noopener noreferrer nofollow">fai pratica a risolvere problemi di algebra in due passaggi.</a> Inoltre, guarda anche il codice che genera i problemi di pratica.
|
||||
|
||||
## --text--
|
||||
|
||||
If you import sympy and define x as a variable, what would be the output from the following code?
|
||||
Se importi sympy e definisci x come una variabile, qual è l'output del seguente codice?
|
||||
|
||||
```py
|
||||
example = 3*x - 12
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d23eb51aeedd1a2bd646
|
||||
title: "Solving for X"
|
||||
title: "Risolvere per X"
|
||||
challengeType: 15
|
||||
videoId: _U9PEFKjyb8
|
||||
dashedName: solving-for-x
|
||||
@@ -8,19 +8,19 @@ dashedName: solving-for-x
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will show you the essence of algebra and then how Python code does the same task in a different way.
|
||||
Questo primo video ti mostrerà l'essenza dell'algebra e poi come il codice Python svolge la stessa attività in modo diverso.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/11Zi77gs1FKoEqfPqYa2HtTENiWZyQAO2?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a> Add the code from the video to your algebra Colab notebook to see how to solve for X using Python. Then change the code if you want, test it, and compare it to paper-and-pencil solving. Remember the equation input needs to be in Python syntax.
|
||||
Ecco il <a href="https://colab.research.google.com/drive/11Zi77gs1FKoEqfPqYa2HtTENiWZyQAO2?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per seguire questo video.</a> Aggiungi il codice del video al tuo notebook Colab per vedere come risolvere per X usando Python. Poi cambia il codice se vuoi, testalo e confrontalo con la soluzione ottenuta con carta e penna. Ricorda che l'input dell'equazione deve rispettare la sintassi di Python.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add the code to solve for x from the video to your algebra Colab notebook.
|
||||
Aggiungi il codice per risolvere per x dal video al tuo notebook Colab.
|
||||
|
||||
## --text--
|
||||
|
||||
In Python, what is the library you import to solve algebra problems with variables?
|
||||
In Python, qual è la libreria che importi per risolvere i problemi di algebra con le variabili?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d2a9b51aeedd1a2bd654
|
||||
title: "Solving Systems of Equations: Extra"
|
||||
title: "Risolvere Sistemi di Equazioni: Extra"
|
||||
challengeType: 15
|
||||
videoId: 856p7t2V9NY
|
||||
dashedName: solving-systems-of-equations-extra
|
||||
@@ -8,31 +8,31 @@ dashedName: solving-systems-of-equations-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This video will show you one way to create a calculator that solves and graphs. It will also show you how to zoom in or zoom out on the graph and write the code to build that feature.
|
||||
Questo video ti mostrerà un modo per creare una calcolatrice che risolve e traccia grafici. Ti mostrerà anche come aumentare o ridurre lo zoom sul grafico e scrivere il codice per costruire questa funzionalità.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a> This will give you an example of what your notebook could look like so far, as you have some functions in there and create headings for the next few functions.
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab notebook usato in questo video.</a> Ti darà un esempio di come potrebbe essere il tuo notebook, con delle funzioni e delle intestazioni per le prossime funzioni.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is not true?
|
||||
Quale delle seguenti affermazioni non è vera?
|
||||
|
||||
## --answers--
|
||||
|
||||
When graphing, you can adjust your tic marks on each axis
|
||||
Quando crei un grafico, è possibile regolare i segni di graduazione su ogni asse
|
||||
|
||||
---
|
||||
|
||||
The `nonlinsolve()` function can solve linear equations
|
||||
La funzione `nonlinsolve()` può risolvere equazioni lineari
|
||||
|
||||
---
|
||||
|
||||
The `linsolve()` function can solve nonlinear equations
|
||||
La funzione `linsolve()` può risolvere equazioni non lineari
|
||||
|
||||
---
|
||||
|
||||
To zoom in or out on a graph, an interactive slider is useful
|
||||
Per zoomare avanti e indietro su un grafico, è utile un cursore interattivo
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d2b0b51aeedd1a2bd655
|
||||
title: "Solving Systems"
|
||||
title: "Risolvere Sistemi"
|
||||
challengeType: 15
|
||||
videoId: CNGUQzXfC6c
|
||||
dashedName: solving-systems
|
||||
@@ -10,29 +10,29 @@ dashedName: solving-systems
|
||||
|
||||
The first video will show you the math behind solving a system of two equations without graphing, how you can factor an equation, and solve for a certain variable.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UfyQiXCedAAv5kcqgi_pGYV-HkSgN8YD?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1UfyQiXCedAAv5kcqgi_pGYV-HkSgN8YD?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab usato in questo video.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add code to your notebook to solve and graph systems of equations
|
||||
Aggiungi al tuo notebook del codice per risolvere e graficare sistemi di equazioni
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following can SymPy do that matplotlib can't do?
|
||||
Quale delle seguenti cose può fare SimPy che matplotlib non può?
|
||||
|
||||
## --answers--
|
||||
|
||||
Solve for a variable
|
||||
Risolvere per una variabile
|
||||
|
||||
---
|
||||
|
||||
Display an x-y axis
|
||||
Mostrare gli assi x-y
|
||||
|
||||
---
|
||||
|
||||
Graph an equation or two
|
||||
Graficare un'equazione o due
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ dashedName: simple-and-compound-interest
|
||||
|
||||
This video will help you understand the equations of simple and compound interest, and what it all means.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1IVBaeX84arJXS73raRROaxbz4qMyFVb6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1IVBaeX84arJXS73raRROaxbz4qMyFVb6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per questo video.</a>
|
||||
|
||||
Here is an additional <a href="https://colab.research.google.com/drive/1-HWYmzKn6HmEUWMBv7G525CpoQpm8TnN?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook that shows you one way to put many of these interest and payment forumlas into Python functions.</a> Also you will see an example of using some formulas to output results, notice a trend, and follow up with other formulas to analyze patterns.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f36e1000cf542c50fe80
|
||||
title: 'Problem 1: Multiples of 3 and 5'
|
||||
title: 'Problema 1: multipli di 3 e 5'
|
||||
challengeType: 1
|
||||
forumTopicId: 301722
|
||||
dashedName: problem-1-multiples-of-3-and-5
|
||||
@@ -8,37 +8,37 @@ dashedName: problem-1-multiples-of-3-and-5
|
||||
|
||||
# --description--
|
||||
|
||||
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
|
||||
Se elenchiamo tutti i numeri naturali sotto il 10 che sono multipli di 3 o 5, otteniamo 3, 5, 6 e 9. La somma di questi multipli è 23.
|
||||
|
||||
Find the sum of all the multiples of 3 or 5 below the provided parameter value `number`.
|
||||
Trova la somma di tutti i multipli di 3 e 5 sotto al valore del parametro `number` inserito.
|
||||
|
||||
# --hints--
|
||||
|
||||
`multiplesOf3and5(10)` should return a number.
|
||||
`multiplesOf3and5(10)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof multiplesOf3and5(10) === 'number');
|
||||
```
|
||||
|
||||
`multiplesOf3and5(49)` should return 543.
|
||||
`multiplesOf3and5(49)` dovrebbe restituire 543.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(49), 543);
|
||||
```
|
||||
|
||||
`multiplesOf3and5(1000)` should return 233168.
|
||||
`multiplesOf3and5(1000)` dovrebbe restituire 233168.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(1000), 233168);
|
||||
```
|
||||
|
||||
`multiplesOf3and5(8456)` should return 16687353.
|
||||
`multiplesOf3and5(8456)` dovrebbe restituire 16687353.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(8456), 16687353);
|
||||
```
|
||||
|
||||
`multiplesOf3and5(19564)` should return 89301183.
|
||||
`multiplesOf3and5(19564)` dovrebbe restituire 89301183.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(19564), 89301183);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3761000cf542c50fe89
|
||||
title: 'Problem 10: Summation of primes'
|
||||
title: 'Problema 10: somma dei numeri primi'
|
||||
challengeType: 1
|
||||
forumTopicId: 301723
|
||||
dashedName: problem-10-summation-of-primes
|
||||
@@ -8,37 +8,37 @@ dashedName: problem-10-summation-of-primes
|
||||
|
||||
# --description--
|
||||
|
||||
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
|
||||
La somma dei numeri primi minori di 10 è 2 + 3 + 5 + 7 = 17.
|
||||
|
||||
Find the sum of all the primes below `n`.
|
||||
Trova la somma di tutti i numeri primi minori di `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`primeSummation(17)` should return a number.
|
||||
`primeSummation(17)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof primeSummation(17) === 'number');
|
||||
```
|
||||
|
||||
`primeSummation(17)` should return 41.
|
||||
`primeSummation(17)` dovrebbe restituire 41.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(17), 41);
|
||||
```
|
||||
|
||||
`primeSummation(2001)` should return 277050.
|
||||
`primeSummation(2001)` dovrebbe ritornare 277050.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(2001), 277050);
|
||||
```
|
||||
|
||||
`primeSummation(140759)` should return 873608362.
|
||||
`primeSummation(140759)` dovrebbe restituire 873608362.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(140759), 873608362);
|
||||
```
|
||||
|
||||
`primeSummation(2000000)` should return 142913828922.
|
||||
`primeSummation(2000000)` dovrebbe restituire 142913828922.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(2000000), 142913828922);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3781000cf542c50fe8a
|
||||
title: 'Problem 11: Largest product in a grid'
|
||||
title: 'Problema 11: prodotto più grande nella griglia'
|
||||
challengeType: 1
|
||||
forumTopicId: 301734
|
||||
dashedName: problem-11-largest-product-in-a-grid
|
||||
@@ -8,7 +8,7 @@ dashedName: problem-11-largest-product-in-a-grid
|
||||
|
||||
# --description--
|
||||
|
||||
In the 20×20 grid below, four numbers along a diagonal line have been marked in red.
|
||||
Nella griglia 20×20 qui sotto, quattro numeri lungo una linea diagonale sono stati contrassegnati in rosso.
|
||||
|
||||
<div style='text-align: center;'>
|
||||
08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08<br>
|
||||
@@ -33,25 +33,25 @@ In the 20×20 grid below, four numbers along a diagonal line have been marked in
|
||||
01 70 54 71 83 51 54 69 16 92 33 48 61 43 52 01 89 19 67 48<br>
|
||||
</div>
|
||||
|
||||
The product of these numbers is 26 × 63 × 78 × 14 = 1788696.
|
||||
Il prodotto di questi numeri è 26 × 63 × 78 × 14 = 1788696.
|
||||
|
||||
What is the greatest product of four adjacent numbers in the same direction (up, down, left, right, or diagonally) in a given `arr` grid?
|
||||
Qual è il prodotto più grande di quattro numeri adiacenti nella stessa direzione (su, giù, sinistra, destra, o diagonalmente) in una griglia `arr` data?
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestGridProduct(testGrid)` should return a number.
|
||||
`largestGridProduct(testGrid)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof largestGridProduct(testGrid) === 'number');
|
||||
```
|
||||
|
||||
`largestGridProduct(testGrid)` should return 14169081.
|
||||
`largestGridProduct(testGrid)` dovrebbe restituire 14169081.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestGridProduct(testGrid), 14169081);
|
||||
```
|
||||
|
||||
`largestGridProduct(grid)` should return 70600674.
|
||||
`largestGridProduct(grid)` dovrebbe restituire 70600674.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestGridProduct(grid), 70600674);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3781000cf542c50fe8b
|
||||
title: 'Problem 12: Highly divisible triangular number'
|
||||
title: 'Problema 12: numero triangolare altamente divisibile'
|
||||
challengeType: 1
|
||||
forumTopicId: 301746
|
||||
dashedName: problem-12-highly-divisible-triangular-number
|
||||
@@ -8,11 +8,11 @@ dashedName: problem-12-highly-divisible-triangular-number
|
||||
|
||||
# --description--
|
||||
|
||||
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
|
||||
La sequenza di numeri triangolari è generata sommando i numeri naturali. Quindi il numero del 7° triangolo sarebbe 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. I primi dieci termini saranno:
|
||||
|
||||
<div style='text-align: center;'>1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...</div>
|
||||
|
||||
Let us list the factors of the first seven triangle numbers:
|
||||
Elenchiamo i fattori dei primi sette numeri triangolari:
|
||||
|
||||
<div style='padding-left: 4em;'><b>1:</b> 1</div>
|
||||
<div style='padding-left: 4em;'><b>3:</b> 1, 3</div>
|
||||
@@ -22,43 +22,43 @@ Let us list the factors of the first seven triangle numbers:
|
||||
<div style='padding-left: 4em;'><b>21:</b> 1, 3, 7, 21</div>
|
||||
<div style='padding-left: 4em;'><b>28:</b> 1, 2, 4, 7, 14, 28</div>
|
||||
|
||||
We can see that 28 is the first triangle number to have over five divisors.
|
||||
Possiamo vedere che 28 è il primo numero triangolare ad avere più di cinque divisori.
|
||||
|
||||
What is the value of the first triangle number to have over `n` divisors?
|
||||
Qual è il valore del primo numero triangolare che ha oltre `n` divisori?
|
||||
|
||||
# --hints--
|
||||
|
||||
`divisibleTriangleNumber(5)` should return a number.
|
||||
`divisibleTriangleNumber(5)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof divisibleTriangleNumber(5) === 'number');
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(5)` should return 28.
|
||||
`divisibleTriangleNumber(5)` dovrebbe restituire 28.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(5), 28);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(23)` should return 630.
|
||||
`divisibleTriangleNumber(23)` dovrebbe restituire 630.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(23), 630);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(167)` should return 1385280.
|
||||
`divisibleTriangleNumber(167)` dovrebbe restituire 1385280.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(167), 1385280);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(374)` should return 17907120.
|
||||
`divisibleTriangleNumber(374)` dovrebbe restituire 17907120.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(374), 17907120);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(500)` should return 76576500.
|
||||
`divisibleTriangleNumber(500)` dovrebbe restituire 76576500.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(500), 76576500);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37a1000cf542c50fe8c
|
||||
title: 'Problem 13: Large sum'
|
||||
title: 'Problema 13: Grande somma'
|
||||
challengeType: 1
|
||||
forumTopicId: 301757
|
||||
dashedName: problem-13-large-sum
|
||||
@@ -8,7 +8,7 @@ dashedName: problem-13-large-sum
|
||||
|
||||
# --description--
|
||||
|
||||
Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.
|
||||
Ottieni le prime 10 cifre della somma dei seguenti cento numeri a 50 cifre.
|
||||
|
||||
<div style='padding-left: 4em;'>
|
||||
37107287533902102798797998220837590246510135740250<br>
|
||||
@@ -115,19 +115,19 @@ Work out the first ten digits of the sum of the following one-hundred 50-digit n
|
||||
|
||||
# --hints--
|
||||
|
||||
`largeSum(testNums)` should return a number.
|
||||
`largeSum(testNums)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof largeSum(testNums) === 'number');
|
||||
```
|
||||
|
||||
`largeSum(testNums)` should return 8348422521.
|
||||
`largeSum(testNums)` dovrebbe restituire 8348422521.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largeSum(testNums), 8348422521);
|
||||
```
|
||||
|
||||
`largeSum(fiftyDigitNums)` should return 5537376230.
|
||||
`largeSum(fiftyDigitNums)` dovrebbe restituire 5537376230.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largeSum(fiftyDigitNums), 5537376230);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37a1000cf542c50fe8d
|
||||
title: 'Problem 14: Longest Collatz sequence'
|
||||
title: 'Problema 14: la sequenza di Collatz più lunga'
|
||||
challengeType: 1
|
||||
forumTopicId: 301768
|
||||
dashedName: problem-14-longest-collatz-sequence
|
||||
@@ -8,61 +8,61 @@ dashedName: problem-14-longest-collatz-sequence
|
||||
|
||||
# --description--
|
||||
|
||||
The following iterative sequence is defined for the set of positive integers:
|
||||
La seguente sequenza iterativa è definita per l'insieme degli interi positivi:
|
||||
|
||||
<div style='padding-left: 4em;'><var>n</var> → <var>n</var>/2 (<var>n</var> is even)</div>
|
||||
<div style='padding-left: 4em;'><var>n</var> → <var>n</var>/2 (<var>n</var> è pari)</div>
|
||||
|
||||
<div style='padding-left: 4em;'><var>n</var> → 3<var>n</var> + 1 (<var>n</var> is odd)</div>
|
||||
<div style='padding-left: 4em;'><var>n</var> → 3<var>n</var> + 1 (<var>n</var> è dispari)</div>
|
||||
|
||||
Using the rule above and starting with 13, we generate the following sequence:
|
||||
Usando le regole qui sopra e iniziando con 13, generiamo la seguente sequenza:
|
||||
|
||||
<div style='text-align: center;'>13 → 40 → 20 → 10 → 5 → 16 → 8 → 4 → 2 → 1</div>
|
||||
|
||||
It can be seen that this sequence (starting at 13 and finishing at 1) contains 10 terms. Although it has not been proved yet (Collatz Problem), it is thought that all starting numbers finish at 1.
|
||||
Puoi vedere che questa sequenza (che inizia con 13 e finisce con 1) contiene 10 termini. Anche se non è ancora stato provato (Problema di Collatz), si pensa che con qualsiasi numeri si parta, si finisce a 1.
|
||||
|
||||
Which starting number, under the given `limit`, produces the longest chain?
|
||||
Quale numero iniziale, sotto il dato limite `limit`, produce la catena più lunga?
|
||||
|
||||
**Note:** Once the chain starts the terms are allowed to go above `limit`.
|
||||
**Nota:** una volta che la catena inizia i termini possono superare `limit`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`longestCollatzSequence(14)` should return a number.
|
||||
`longestCollatzSequence(14)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof longestCollatzSequence(14) === 'number');
|
||||
```
|
||||
|
||||
`longestCollatzSequence(14)` should return 9.
|
||||
`longestCollatzSequence(14)` dovrebbe restituire 9.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(14), 9);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(5847)` should return 3711.
|
||||
`longestCollatzSequence(5847)` dovrebbe restituire 3711.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(5847), 3711);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(46500)` should return 35655.
|
||||
`longestCollatzSequence(46500)` dovrebbe restituire 35655.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(46500), 35655);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(54512)` should return 52527.
|
||||
`longestCollatzSequence(54512)` dovrebbe restituire 52527.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(54512), 52527);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(100000)` should return 77031.
|
||||
`longestCollatzSequence(100000)` dovrebbe restituire 77031.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(100000), 77031);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(1000000)` should return 837799.
|
||||
`longestCollatzSequence(1000000)` dovrebbe restituire 837799.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(1000000), 837799);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37b1000cf542c50fe8e
|
||||
title: 'Problem 15: Lattice paths'
|
||||
title: 'Problema 15: percorsi nel reticolo'
|
||||
challengeType: 1
|
||||
forumTopicId: 301780
|
||||
dashedName: problem-15-lattice-paths
|
||||
@@ -8,33 +8,33 @@ dashedName: problem-15-lattice-paths
|
||||
|
||||
# --description--
|
||||
|
||||
Starting in the top left corner of a 2×2 grid, and only being able to move to the right and down, there are exactly 6 routes to the bottom right corner.
|
||||
Iniziando nell'angolo in alto a sinistra di una griglia 2x2, e avendo l'abilità di muoversi solo verso destra e verso il basso, ci sono esattamente 6 strade verso l'angolo in basso a sinistra.
|
||||
|
||||
<img class="img-responsive center-block" alt="a diagram of 6 2 by 2 grids showing all the routes to the bottom right corner" src="https://cdn-media-1.freecodecamp.org/project-euler/1Atixoj.gif" style="background-color: white; padding: 10px;" />
|
||||
<img class="img-responsive center-block" alt="un diagramma di 6 griglie 2 per 2 che mostra tutte le strade per raggiungere l'angolo in basso a destra" src="https://cdn-media-1.freecodecamp.org/project-euler/1Atixoj.gif" style="background-color: white; padding: 10px;" />
|
||||
|
||||
How many such routes are there through a given `gridSize`?
|
||||
Quante strade di questo tipo ci sono data la dimensione della griglia `gridSize`?
|
||||
|
||||
# --hints--
|
||||
|
||||
`latticePaths(4)` should return a number.
|
||||
`latticePaths(4)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof latticePaths(4) === 'number');
|
||||
```
|
||||
|
||||
`latticePaths(4)` should return 70.
|
||||
`latticePaths(4)` dovrebbe restituire 70.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(4), 70);
|
||||
```
|
||||
|
||||
`latticePaths(9)` should return 48620.
|
||||
`latticePaths(9)` dovrebbe restituire 48620.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(9), 48620);
|
||||
```
|
||||
|
||||
`latticePaths(20)` should return 137846528820.
|
||||
`latticePaths(20)` dovrebbe restituire 137846528820.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(20), 137846528820);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37d1000cf542c50fe8f
|
||||
title: 'Problem 16: Power digit sum'
|
||||
title: 'Problema 16: somma delle cifre della potenza'
|
||||
challengeType: 1
|
||||
forumTopicId: 301791
|
||||
dashedName: problem-16-power-digit-sum
|
||||
@@ -8,31 +8,31 @@ dashedName: problem-16-power-digit-sum
|
||||
|
||||
# --description--
|
||||
|
||||
2<sup>15</sup> = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
|
||||
2<sup>15</sup> = 32768 e la somma delle sue cifre è 3 + 2 + 7 + 6 + 8 = 26.
|
||||
|
||||
What is the sum of the digits of the number 2<sup><code>exponent</code></sup>?
|
||||
Qual'è la somma delle cifre del numero 2<sup><code>exponent</code></sup>?
|
||||
|
||||
# --hints--
|
||||
|
||||
`powerDigitSum(15)` should return a number.
|
||||
`powerDigitSum(15)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof powerDigitSum(15) === 'number');
|
||||
```
|
||||
|
||||
`powerDigitSum(15)` should return 26.
|
||||
`powerDigitSum(15)` dovrebbe restituire 26.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(15), 26);
|
||||
```
|
||||
|
||||
`powerDigitSum(128)` should return 166.
|
||||
`powerDigitSum(128)` dovrebbe restituire 166.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(128), 166);
|
||||
```
|
||||
|
||||
`powerDigitSum(1000)` should return 1366.
|
||||
`powerDigitSum(1000)` dovrebbe restituire 1366.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(1000), 1366);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37d1000cf542c50fe90
|
||||
title: 'Problem 17: Number letter counts'
|
||||
title: 'Problema 17: conteggio delle lettere dei numeri'
|
||||
challengeType: 1
|
||||
forumTopicId: 301804
|
||||
dashedName: problem-17-number-letter-counts
|
||||
@@ -8,33 +8,33 @@ dashedName: problem-17-number-letter-counts
|
||||
|
||||
# --description--
|
||||
|
||||
If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.
|
||||
Se i numeri da 1 a 5 vengono scritti in parole in inglese: one, two, three, four, five, allora ci sono 3 + 3 + 5 + 4 + 4 = 19 lettere usate in totale.
|
||||
|
||||
If all the numbers from 1 to given `limit` inclusive were written out in words, how many letters would be used?
|
||||
Se tutti i numeri da 1 al dato limite inclusivo `limit` fossero scritti in parole in inglese, quante lettere sarebbero usate?
|
||||
|
||||
**Note:** Do not count spaces or hyphens. For example, 342 (three hundred and forty-two) contains 23 letters and 115 (one hundred and fifteen) contains 20 letters. The use of "and" when writing out numbers is in compliance with British usage.
|
||||
**Nota:** non contare gli spazi o i trattini. Per esempio, 342 (three hundred and forty-two) contiene 23 lettere e 115 (one hundred and fifteen) contiene 20 lettere. L'uso di "and" scrivendo i numeri segue l'uso britannico.
|
||||
|
||||
# --hints--
|
||||
|
||||
`numberLetterCounts(5)` should return a number.
|
||||
`numberLetterCounts(5)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof numberLetterCounts(5) === 'number');
|
||||
```
|
||||
|
||||
`numberLetterCounts(5)` should return 19.
|
||||
`numberLetterCounts(5)` dovrebbe restituire 19.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(5), 19);
|
||||
```
|
||||
|
||||
`numberLetterCounts(150)` should return 1903.
|
||||
`numberLetterCounts(150)` dovrebbe restituire 1903.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(150), 1903);
|
||||
```
|
||||
|
||||
`numberLetterCounts(1000)` should return 21124.
|
||||
`numberLetterCounts(1000)` dovrebbe restituire 21124.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(1000), 21124);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37e1000cf542c50fe91
|
||||
title: 'Problem 18: Maximum path sum I'
|
||||
title: 'Problema 18: somma massima del percorso I'
|
||||
challengeType: 1
|
||||
forumTopicId: 301815
|
||||
dashedName: problem-18-maximum-path-sum-i
|
||||
@@ -8,7 +8,7 @@ dashedName: problem-18-maximum-path-sum-i
|
||||
|
||||
# --description--
|
||||
|
||||
By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23.
|
||||
Cominciando dalla parte superiore del triangolo sottostante e spostandosi verso i numeri adiacenti sulla riga sottostante, il totale massimo dall'alto al basso è 23.
|
||||
|
||||
<span style='display: block; text-align: center;'>
|
||||
<strong style='color: red;'>3</strong><br>
|
||||
@@ -17,9 +17,9 @@ By starting at the top of the triangle below and moving to adjacent numbers on t
|
||||
8 5 <strong style='color: red;'>9</strong> 3
|
||||
</span>
|
||||
|
||||
That is, 3 + 7 + 4 + 9 = 23.
|
||||
Cioè, 3 + 7 + 4 + 9 = 23.
|
||||
|
||||
Find the maximum total from top to bottom of the triangle below:
|
||||
Trova il totale massimo dall'alto al basso del triangolo qui sotto:
|
||||
|
||||
75
|
||||
95 64
|
||||
@@ -37,23 +37,23 @@ Find the maximum total from top to bottom of the triangle below:
|
||||
63 66 04 68 89 53 67 30 73 16 69 87 40 31
|
||||
04 62 98 27 23 09 70 98 73 93 38 53 60 04 23
|
||||
|
||||
**NOTE:** As there are only 16384 routes, it is possible to solve this problem by trying every route. However, Problem 67, is the same challenge with a triangle containing one-hundred rows; it cannot be solved by brute force, and requires a clever method! ;o)
|
||||
**NOTA:** poiché ci sono solo 16384 percorsi, è possibile risolvere questo problema provando ogni percorso. Tuttavia, il Problema 67, è la stessa sfida con un triangolo contenente cento righe; non può essere risolto per forza bruta, e richiede un metodo ingegnoso! ;o)
|
||||
|
||||
# --hints--
|
||||
|
||||
`maximumPathSumI(testTriangle)` should return a number.
|
||||
`maximumPathSumI(testTriangle)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof maximumPathSumI(testTriangle) === 'number');
|
||||
```
|
||||
|
||||
`maximumPathSumI(testTriangle)` should return 23.
|
||||
`maximumPathSumI(testTriangle)` dovrebbe restituire 23.
|
||||
|
||||
```js
|
||||
assert.strictEqual(maximumPathSumI(testTriangle), 23);
|
||||
```
|
||||
|
||||
`maximumPathSumI(numTriangle)` should return 1074.
|
||||
`maximumPathSumI(numTriangle)` dovrebbe restituire 1074.
|
||||
|
||||
```js
|
||||
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f37f1000cf542c50fe92
|
||||
title: 'Problem 19: Counting Sundays'
|
||||
title: 'Problema 19: contare le domeniche'
|
||||
challengeType: 1
|
||||
forumTopicId: 301827
|
||||
dashedName: problem-19-counting-sundays
|
||||
@@ -8,37 +8,37 @@ dashedName: problem-19-counting-sundays
|
||||
|
||||
# --description--
|
||||
|
||||
You are given the following information, but you may prefer to do some research for yourself.
|
||||
Ti sono fornite le seguenti informazioni, ma potresti voler fare un po' di ricerca per conto tuo.
|
||||
|
||||
<ul>
|
||||
<li>1 Jan 1900 was a Monday.</li>
|
||||
<li>Thirty days has September,<br>April, June and November.<br>All the rest have thirty-one,<br>Saving February alone,<br>Which has twenty-eight, rain or shine.<br>And on leap years, twenty-nine.</li>
|
||||
<li>A leap year occurs on any year evenly divisible by 4, but not on a century unless it is divisible by 400.</li>
|
||||
<li>Il 1 Gennaio 1900 era un lunedì.</li>
|
||||
<li>Trenta giorni a novembre,<br>con april, giugno e settembre,<br>di ventotto ce n'è uno,<br>tutti gli altri ne han trentuno.</li>
|
||||
<li>Un anno bisestile si verifica in qualsiasi anno divisibile per 4, ma non in un anno divisibile per 100 a meno che non sia divisibile per 400.</li>
|
||||
</ul>
|
||||
|
||||
How many Sundays fell on the first of the month during the twentieth century (1 Jan 1901 to 31 Dec 2000)?
|
||||
Quante domeniche sono cadute il primo del mese durante il ventesimo secolo (dal 1 Gen 1901 al 31 Dic 2000)?
|
||||
|
||||
# --hints--
|
||||
|
||||
`countingSundays(1943, 1946)` should return a number.
|
||||
`countingSundays(1943, 1946)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof countingSundays(1943, 1946) === 'number');
|
||||
```
|
||||
|
||||
`countingSundays(1943, 1946)` should return 6.
|
||||
`countingSundays(1943, 1946)` dovrebbe restituire 6.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1943, 1946), 6);
|
||||
```
|
||||
|
||||
`countingSundays(1995, 2000)` should return 10.
|
||||
`countingSundays(1995, 2000)` dovrebbe restituire 10.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1995, 2000), 10);
|
||||
```
|
||||
|
||||
`countingSundays(1901, 2000)` should return 171.
|
||||
`countingSundays(1901, 2000)` dovrebbe restituire 171.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1901, 2000), 171);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f36e1000cf542c50fe81
|
||||
title: 'Problem 2: Even Fibonacci Numbers'
|
||||
title: 'Problema 2: serie pari di Fibonacci'
|
||||
challengeType: 1
|
||||
forumTopicId: 301838
|
||||
dashedName: problem-2-even-fibonacci-numbers
|
||||
@@ -8,63 +8,63 @@ dashedName: problem-2-even-fibonacci-numbers
|
||||
|
||||
# --description--
|
||||
|
||||
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
|
||||
Ogni nuovo termine della sequenza di Fibonacci è dato dalla somma dei due numeri precedenti. A partire da 1 e 2, i primi 10 termini saranno:
|
||||
|
||||
<div style='text-align: center;'>1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...</div>
|
||||
|
||||
By considering the terms in the Fibonacci sequence whose values do not exceed `n`, find the sum of the even-valued terms.
|
||||
Considerando i termini nella sequenza di Fibonacci i cui valori non superano `n`, trova la somma dei termini pari.
|
||||
|
||||
# --hints--
|
||||
|
||||
`fiboEvenSum(10)` should return a number.
|
||||
`fiboEvenSum(10)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof fiboEvenSum(10) === 'number');
|
||||
```
|
||||
|
||||
Your function should return an even value.
|
||||
La funzione dovrebbe restituire un valore pari.
|
||||
|
||||
```js
|
||||
assert.equal(fiboEvenSum(10) % 2 === 0, true);
|
||||
```
|
||||
|
||||
Your function should sum the even-valued Fibonacci numbers: `fiboEvenSum(8)` should return 10.
|
||||
La funzione dovrebbe sommare i numeri di Fibonacci con valore pari: `fiboEvenSum(8)` dovrebbe restituire 10.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(8), 10);
|
||||
```
|
||||
|
||||
`fiboEvenSum(10)` should return 10.
|
||||
`fiboEvenSum(10)` dovrebbe restituire 10.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(10), 10);
|
||||
```
|
||||
|
||||
`fiboEvenSum(34)` should return 44.
|
||||
`fiboEvenSum(34)` dovrebbe restituire 44.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(34), 44);
|
||||
```
|
||||
|
||||
`fiboEvenSum(60)` should return 44.
|
||||
`fiboEvenSum(60)` dovrebbe restituire 44.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(60), 44);
|
||||
```
|
||||
|
||||
`fiboEvenSum(1000)` should return 798.
|
||||
`fiboEvenSum(1000)` dovrebbe restituire 798.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(1000), 798);
|
||||
```
|
||||
|
||||
`fiboEvenSum(100000)` should return 60696.
|
||||
`fiboEvenSum(100000)` dovrebbe restituire 60696.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(100000), 60696);
|
||||
```
|
||||
|
||||
`fiboEvenSum(4000000)` should return 4613732.
|
||||
`fiboEvenSum(4000000)` dovrebbe restituire 4613732.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(4000000), 4613732);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3801000cf542c50fe93
|
||||
title: 'Problem 20: Factorial digit sum'
|
||||
title: 'Problema 20: somma delle cifre del fattoriale'
|
||||
challengeType: 1
|
||||
forumTopicId: 301839
|
||||
dashedName: problem-20-factorial-digit-sum
|
||||
@@ -8,46 +8,46 @@ dashedName: problem-20-factorial-digit-sum
|
||||
|
||||
# --description--
|
||||
|
||||
`n`! means `n` × (`n` − 1) × ... × 3 × 2 × 1
|
||||
`n`! significa `n` × (`n` − 1) × ... × 3 × 2 × 1
|
||||
|
||||
For example, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
|
||||
and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
|
||||
Ad esempio, 10! = 10 × 9 × ... × 3 × 2 × 1 = 3628800,
|
||||
e la somma delle cifre nel numero 10! è 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27.
|
||||
|
||||
Find the sum of the digits `n`!
|
||||
Trova la somma delle cifre del numero `n`!
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumFactorialDigits(10)` should return a number.
|
||||
`sumFactorialDigits(10)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof sumFactorialDigits(10) === 'number');
|
||||
```
|
||||
|
||||
`sumFactorialDigits(10)` should return 27.
|
||||
`sumFactorialDigits(10)` dovrebbe restituire 27.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(10), 27);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(25)` should return 72.
|
||||
`sumFactorialDigits(25)` dovrebbe restituire 72.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(25), 72);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(50)` should return 216.
|
||||
`sumFactorialDigits(50)` dovrebbe restituire 216.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(50), 216);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(75)` should return 432.
|
||||
`sumFactorialDigits(75)` dovrebbe restituire 432.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(75), 432);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(100)` should return 648.
|
||||
`sumFactorialDigits(100)` dovrebbe restituire 648.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(100), 648);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3811000cf542c50fe94
|
||||
title: 'Problem 21: Amicable numbers'
|
||||
title: 'Problema 21: numeri amicabili'
|
||||
challengeType: 1
|
||||
forumTopicId: 301851
|
||||
dashedName: problem-21-amicable-numbers
|
||||
@@ -8,41 +8,41 @@ dashedName: problem-21-amicable-numbers
|
||||
|
||||
# --description--
|
||||
|
||||
Let d(`n`) be defined as the sum of proper divisors of `n` (numbers less than `n` which divide evenly into `n`).
|
||||
Si definisce d(`n`) la somma dei divisori propri di `n` (numeri inferiori a `n` che dividono `n` senza resto).
|
||||
|
||||
If d(`a`) = `b` and d(`b`) = `a`, where `a` ≠ `b`, then `a` and `b` are an amicable pair and each of `a` and `b` are called amicable numbers.
|
||||
Se d(`a`) = `b` e d(`b`) = `a`, dove `a` ≠ `b`, allora `a` e `b` sono una coppia amichevole e `a` e `b` sono chiamati numeri amicabili.
|
||||
|
||||
For example, the proper divisors of 220 are 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 and 110; therefore d(220) = 284. The proper divisors of 284 are 1, 2, 4, 71 and 142; so d(284) = 220.
|
||||
Ad esempio, i divisori propri di 220 sono 1, 2, 4, 5, 10, 11, 20, 22, 44, 55 e 110; quindi d(220) = 284. I divisori propri di 284 sono 1, 2, 4, 71 e 142; quindi d(284) = 220.
|
||||
|
||||
Evaluate the sum of all the amicable numbers under `n`.
|
||||
Valutare la somma di tutti i numeri amicabili inferiori a `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumAmicableNum(1000)` should return a number.
|
||||
`sumAmicableNum(1000)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof sumAmicableNum(1000) === 'number');
|
||||
```
|
||||
|
||||
`sumAmicableNum(1000)` should return 504.
|
||||
`sumAmicableNum(1000)` dovrebbe restituire 504.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(1000), 504);
|
||||
```
|
||||
|
||||
`sumAmicableNum(2000)` should return 2898.
|
||||
`sumAmicableNum(2000)` dovrebbe restituire 2898.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(2000), 2898);
|
||||
```
|
||||
|
||||
`sumAmicableNum(5000)` should return 8442.
|
||||
`sumAmicableNum(5000)` dovrebbe restituire 8442.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(5000), 8442);
|
||||
```
|
||||
|
||||
`sumAmicableNum(10000)` should return 31626.
|
||||
`sumAmicableNum(10000)` dovrebbe restituire 31626.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(10000), 31626);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a51eabcad78bf416f316e2a
|
||||
title: 'Problem 22: Names scores'
|
||||
title: 'Problema 22: punteggi dei nomi'
|
||||
challengeType: 1
|
||||
forumTopicId: 301862
|
||||
dashedName: problem-22-names-scores
|
||||
@@ -8,33 +8,33 @@ dashedName: problem-22-names-scores
|
||||
|
||||
# --description--
|
||||
|
||||
Using `names`, an array defined in the background containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a name score.
|
||||
Inizia ordinando in ordine alfabetico `names`, un array definito in background contenente oltre cinquemila nomi. Quindi calcola il valore alfabetico per ogni nome, moltiplica questo valore per la sua posizione alfabetica nella lista per ottenere un punteggio per il nome.
|
||||
|
||||
For example, when the list is sorted into alphabetical order, COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN would obtain a score of 938 × 53 = 49714.
|
||||
Ad esempio, quando la lista è ordinata in ordine alfabetico, COLIN, che vale 3 + 15 + 12 + 9 + 14 = 53, è il 938-mo nome dell'elenco. Pertanto, COLIN otterrebbe un punteggio di 938 × 53 = 49714.
|
||||
|
||||
What is the total of all the name scores in the array?
|
||||
Qual è il totale di tutti i punteggi dei nomi nell'array?
|
||||
|
||||
# --hints--
|
||||
|
||||
`namesScores(test1)` should return a number.
|
||||
`namesScores(test1)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof namesScores(test1) === 'number');
|
||||
```
|
||||
|
||||
`namesScores(test1)` should return 791.
|
||||
`namesScores(test1)` dovrebbe restituire 791.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(test1), 791);
|
||||
```
|
||||
|
||||
`namesScores(test2)` should return 1468.
|
||||
`namesScores(test2)` dovrebbe restituire 1468.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(test2), 1468);
|
||||
```
|
||||
|
||||
`namesScores(names)` should return 871198282.
|
||||
`namesScores(names)` dovrebbe restituire 871198282.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(names), 871198282);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3831000cf542c50fe96
|
||||
title: 'Problem 23: Non-abundant sums'
|
||||
title: 'Problema 23: somme non abbondanti'
|
||||
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.
|
||||
Un numero perfetto è un numero per cui la somma dei suoi divisori propri è uguale al numero stesso. Per esempio, la somma dei divisori propri di 28 sarebbe 1 + 2 + 4 + 7 + 14 = 28, il che significa che 28 è un numero perfetto.
|
||||
|
||||
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`.
|
||||
Un numero `n` è chiamato deficiente se la somma dei suoi divisori è minore di `n` ed è chiamato abbondante se la somma eccede `n`.
|
||||
|
||||
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.
|
||||
Visto che 12 è il numero abbondante più piccolo, 1 + 2 + 3 + 4 + 6 = 16, il numero più piccolo che può essere scritto come somma di due numeri abbondanti è 24. Tramite l'analisi matematica, si può mostrare che tutti gli interi più grandi di 28123 possono essere scritti come somma di due numeri abbondanti. Eppure, questo limite superiore non può essere ridotto ulteriormente tramite analisi, anche se è noto che il numero più grande che non può essere espresso come somma di due numeri abbondanti è più piccolo di questo limite.
|
||||
|
||||
Find the sum of all positive integers <= `n` which cannot be written as the sum of two abundant numbers.
|
||||
Trova la somma di tutti i numeri interi positivi <= `n` che non possono essere scritti come somma di due numeri abbondanti.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumOfNonAbundantNumbers(10000)` should return a number.
|
||||
`sumOfNonAbundantNumbers(10000)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof sumOfNonAbundantNumbers(10000) === 'number');
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(10000)` should return 3731004.
|
||||
`sumOfNonAbundantNumbers(10000)` dovrebbe restituire 3731004.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(10000) === 3731004);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(15000)` should return 4039939.
|
||||
`sumOfNonAbundantNumbers(15000)` dovrebbe restituire 4039939.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(15000) === 4039939);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(20000)` should return 4159710.
|
||||
`sumOfNonAbundantNumbers(20000)` dovrebbe restituire 4159710.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(20000) === 4159710);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(28123)` should return 4179871.
|
||||
`sumOfNonAbundantNumbers(28123)` dovrebbe restituire 4179871.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(28123) === 4179871);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3841000cf542c50fe97
|
||||
title: 'Problem 24: Lexicographic permutations'
|
||||
title: 'Problema 24: permutazioni lessicografiche'
|
||||
challengeType: 1
|
||||
forumTopicId: 301885
|
||||
dashedName: problem-24-lexicographic-permutations
|
||||
@@ -8,39 +8,39 @@ dashedName: problem-24-lexicographic-permutations
|
||||
|
||||
# --description--
|
||||
|
||||
A permutation is an ordered arrangement of objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the permutations are listed numerically or alphabetically, we call it lexicographic order. The lexicographic permutations of 0, 1 and 2 are:
|
||||
Una permutazione è un arrangiamento ordinato di oggetti. Per esempio, 3124 è una possibile permutazione delle cifre 1, 2, 3 e 4. Se tutte le permutazioni sono elencate numericamente o alfabeticamente, si parla di ordine lessicografico. Le permutazioni lessicografiche di 0, 1 e 2 sono:
|
||||
|
||||
<div style='text-align: center;'>012 021 102 120 201 210</div>
|
||||
|
||||
What is the `n`th lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7, 8 and 9?
|
||||
Qual è l'`n`-sima permutazione lessicografica delle cifre 0, 1, 2, 3, 4, 5, 6, 7, 8 e 9?
|
||||
|
||||
# --hints--
|
||||
|
||||
`lexicographicPermutations(699999)` should return a number.
|
||||
`lexicographicPermutations(699999)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof lexicographicPermutations(699999) === 'number');
|
||||
```
|
||||
|
||||
`lexicographicPermutations(699999)` should return 1938246570.
|
||||
`lexicographicPermutations(699999)` dovrebbe restituire 1938246570.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(699999) == 1938246570);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(899999)` should return 2536987410.
|
||||
`lexicographicPermutations(899999)` dovrebbe restituire 2536987410.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(899999) == 2536987410);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(900000)` should return 2537014689.
|
||||
`lexicographicPermutations(900000)` dovrebbe restituire 2537014689.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(900000) == 2537014689);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(999999)` should return 2783915460.
|
||||
`lexicographicPermutations(999999)` dovrebbe restituire 2783915460.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(999999) == 2783915460);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3851000cf542c50fe98
|
||||
title: 'Problem 25: 1000-digit Fibonacci number'
|
||||
title: 'Problema 25: numero di Fibonacci a 1000 cifre'
|
||||
challengeType: 1
|
||||
forumTopicId: 301897
|
||||
dashedName: problem-25-1000-digit-fibonacci-number
|
||||
@@ -8,45 +8,45 @@ dashedName: problem-25-1000-digit-fibonacci-number
|
||||
|
||||
# --description--
|
||||
|
||||
The Fibonacci sequence is defined by the recurrence relation:
|
||||
La sequenza di Fibonacci è definita dalla relazione ricorsiva:
|
||||
|
||||
<div style='padding-left: 4em;'>F<sub>n</sub> = F<sub>n−1</sub> + F<sub>n−2</sub>, where F<sub>1</sub> = 1 and F<sub>2</sub> = 1.</div>
|
||||
<div style='padding-left: 4em;'>F<sub>n</sub> = F<sub>n−1</sub> + F<sub>n−2</sub>, dove F<sub>1</sub> = 1 e F<sub>2</sub> = 1.</div>
|
||||
|
||||
Hence the first 12 terms will be:
|
||||
Quindi i primi 12 termini saranno:
|
||||
|
||||
<div style='padding-left: 4em; display: inline-grid; grid-template-rows: auto; row-gap: 7px;'><div>F<sub>1</sub> = 1</div><div>F<sub>2</sub> = 1</div><div>F<sub>3</sub> = 2</div><div>F<sub>4</sub> = 3</div><div>F<sub>5</sub> = 5</div><div>F<sub>6</sub> = 8</div><div>F<sub>7</sub> = 13</div><div>F<sub>8</sub> = 21</div><div>F<sub>9</sub> = 34</div><div>F<sub>10</sub> = 55</div><div>F<sub>11</sub> = 89</div><div>F<sub>12</sub> = 144</div></div>
|
||||
|
||||
The 12th term, F<sub>12</sub>, is the first term to contain three digits.
|
||||
Il dodicesimo termine, F<sub>12</sub>, è il primo termine a contenere tre cifre.
|
||||
|
||||
What is the index of the first term in the Fibonacci sequence to contain `n` digits?
|
||||
Qual è l'indice del primo termine nella sequenza di Fibonacci contenente `n` cifre?
|
||||
|
||||
# --hints--
|
||||
|
||||
`digitFibonacci(5)` should return a number.
|
||||
`digitFibonacci(5)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof digitFibonacci(5) === 'number');
|
||||
```
|
||||
|
||||
`digitFibonacci(5)` should return 21.
|
||||
`digitFibonacci(5)` dovrebbe restituire 21.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(5), 21);
|
||||
```
|
||||
|
||||
`digitFibonacci(10)` should return 45.
|
||||
`digitFibonacci(10)` dovrebbe restituire 45.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(10), 45);
|
||||
```
|
||||
|
||||
`digitFibonacci(15)` should return 69.
|
||||
`digitFibonacci(15)` dovrebbe restituire 69.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(15), 69);
|
||||
```
|
||||
|
||||
`digitFibonacci(20)` should return 93.
|
||||
`digitFibonacci(20)` dovrebbe restituire 93.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(20), 93);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f36f1000cf542c50fe82
|
||||
title: 'Problem 3: Largest prime factor'
|
||||
title: 'Problema 3: il più grande fattore primo'
|
||||
challengeType: 1
|
||||
forumTopicId: 301952
|
||||
dashedName: problem-3-largest-prime-factor
|
||||
@@ -8,55 +8,55 @@ dashedName: problem-3-largest-prime-factor
|
||||
|
||||
# --description--
|
||||
|
||||
The prime factors of 13195 are 5, 7, 13 and 29.
|
||||
I fattori primi di 13195 sono 5, 7, 13 e 29.
|
||||
|
||||
What is the largest prime factor of the given `number`?
|
||||
Qual è il fattore primo più grande del numero `number` dato?
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestPrimeFactor(2)` should return a number.
|
||||
`largestPrimeFactor(2)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof largestPrimeFactor(2) === 'number');
|
||||
```
|
||||
|
||||
`largestPrimeFactor(2)` should return 2.
|
||||
`largestPrimeFactor(2)` dovrebbe restituire 2.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(2), 2);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(3)` should return 3.
|
||||
`largestPrimeFactor(3)` dovrebbe restituire 3.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(3), 3);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(5)` should return 5.
|
||||
`largestPrimeFactor(5)` dovrebbe restituire 5.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(5), 5);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(7)` should return 7.
|
||||
`largestPrimeFactor(7)` dovrebbe restituire 7.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(7), 7);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(8)` should return 2.
|
||||
`largestPrimeFactor(8)` dovrebbe restituire 2.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(8), 2);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(13195)` should return 29.
|
||||
`largestPrimeFactor(13195)` dovrebbe restituire 29.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(13195), 29);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(600851475143)` should return 6857.
|
||||
`largestPrimeFactor(600851475143)` dovrebbe restituire 6857.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(600851475143), 6857);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3701000cf542c50fe83
|
||||
title: 'Problem 4: Largest palindrome product'
|
||||
title: 'Problema 4: prodotto palindromo più grande'
|
||||
challengeType: 1
|
||||
forumTopicId: 302065
|
||||
dashedName: problem-4-largest-palindrome-product
|
||||
@@ -8,25 +8,25 @@ dashedName: problem-4-largest-palindrome-product
|
||||
|
||||
# --description--
|
||||
|
||||
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
|
||||
Un numero palindromico rimane lo stesso se viene letto in entrambi i sensi. Il palindromo più grande ottenuto dal prodotto con due numeri a due cifre è 9009 = 91 × 99.
|
||||
|
||||
Find the largest palindrome made from the product of two `n`-digit numbers.
|
||||
Trova il più grande palindromo formato dal prodotto di due numeri con `n` cifre.
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestPalindromeProduct(2)` should return a number.
|
||||
`largestPalindromeProduct(2)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof largestPalindromeProduct(2) === 'number');
|
||||
```
|
||||
|
||||
`largestPalindromeProduct(2)` should return 9009.
|
||||
`largestPalindromeProduct(2)` dovrebbe restituire 9009.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPalindromeProduct(2), 9009);
|
||||
```
|
||||
|
||||
`largestPalindromeProduct(3)` should return 906609.
|
||||
`largestPalindromeProduct(3)` dovrebbe restituire 906609.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPalindromeProduct(3), 906609);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3711000cf542c50fe84
|
||||
title: 'Problem 5: Smallest multiple'
|
||||
title: 'Problema 5: il multiplo più piccolo'
|
||||
challengeType: 1
|
||||
forumTopicId: 302160
|
||||
dashedName: problem-5-smallest-multiple
|
||||
@@ -8,43 +8,43 @@ dashedName: problem-5-smallest-multiple
|
||||
|
||||
# --description--
|
||||
|
||||
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
|
||||
2520 è il numero più piccolo divisibile per ciascuno dei numeri da 1 a 10 senza resto.
|
||||
|
||||
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to `n`?
|
||||
Qual è il numero positivo più piccolo che sia uniformemente divisibile per tutti i numeri da 1 a `n`?
|
||||
|
||||
# --hints--
|
||||
|
||||
`smallestMult(5)` should return a number.
|
||||
`smallestMult(5)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof smallestMult(5) === 'number');
|
||||
```
|
||||
|
||||
`smallestMult(5)` should return 60.
|
||||
`smallestMult(5)` dovrebbe restituire 60.
|
||||
|
||||
```js
|
||||
assert.strictEqual(smallestMult(5), 60);
|
||||
```
|
||||
|
||||
`smallestMult(7)` should return 420.
|
||||
`smallestMult(7)` dovrebbe restituire 420.
|
||||
|
||||
```js
|
||||
assert.strictEqual(smallestMult(7), 420);
|
||||
```
|
||||
|
||||
`smallestMult(10)` should return 2520.
|
||||
`smallestMult(10)` dovrebbe restituire 2520.
|
||||
|
||||
```js
|
||||
assert.strictEqual(smallestMult(10), 2520);
|
||||
```
|
||||
|
||||
`smallestMult(13)` should return 360360.
|
||||
`smallestMult(13)` dovrebbe restituire 360360.
|
||||
|
||||
```js
|
||||
assert.strictEqual(smallestMult(13), 360360);
|
||||
```
|
||||
|
||||
`smallestMult(20)` should return 232792560.
|
||||
`smallestMult(20)` dovrebbe restituire 232792560.
|
||||
|
||||
```js
|
||||
assert.strictEqual(smallestMult(20), 232792560);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3721000cf542c50fe85
|
||||
title: 'Problem 6: Sum square difference'
|
||||
title: 'Problema 6: differenza somma quadrati'
|
||||
challengeType: 1
|
||||
forumTopicId: 302171
|
||||
dashedName: problem-6-sum-square-difference
|
||||
@@ -8,39 +8,39 @@ dashedName: problem-6-sum-square-difference
|
||||
|
||||
# --description--
|
||||
|
||||
The sum of the squares of the first ten natural numbers is,
|
||||
La somma dei quadrati dei primi dieci numeri naturali è,
|
||||
|
||||
<div style='text-align: center;'>1<sup>2</sup> + 2<sup>2</sup> + ... + 10<sup>2</sup> = 385</div>
|
||||
|
||||
The square of the sum of the first ten natural numbers is,
|
||||
Il quadrato della somma dei primi dieci numeri naturali è
|
||||
|
||||
<div style='text-align: center;'>(1 + 2 + ... + 10)<sup>2</sup> = 55<sup>2</sup> = 3025</div>
|
||||
|
||||
Hence the difference between the sum of the squares of the first ten natural numbers and the square of the sum is 3025 − 385 = 2640.
|
||||
Da qui la differenza tra la somma dei quadrati dei primi dieci numeri naturali e il quadrato della somma è 3025 − 385 = 2640.
|
||||
|
||||
Find the difference between the sum of the squares of the first `n` natural numbers and the square of the sum.
|
||||
Trova la differenza tra la somma dei quadrati dei primi `n` numeri naturali e il quadrato della loro somma.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumSquareDifference(10)` should return a number.
|
||||
`sumSquareDifference(10)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof sumSquareDifference(10) === 'number');
|
||||
```
|
||||
|
||||
`sumSquareDifference(10)` should return 2640.
|
||||
`sumSquareDifference(10)` dovrebbe restituire 2640.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumSquareDifference(10), 2640);
|
||||
```
|
||||
|
||||
`sumSquareDifference(20)` should return 41230.
|
||||
`sumSquareDifference(20)` dovrebbe restituire 41230.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumSquareDifference(20), 41230);
|
||||
```
|
||||
|
||||
`sumSquareDifference(100)` should return 25164150.
|
||||
`sumSquareDifference(100)` dovrebbe restituire 25164150.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumSquareDifference(100), 25164150);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3731000cf542c50fe86
|
||||
title: 'Problem 7: 10001st prime'
|
||||
title: 'Problema 7: 10001esimo primo'
|
||||
challengeType: 1
|
||||
forumTopicId: 302182
|
||||
dashedName: problem-7-10001st-prime
|
||||
@@ -8,43 +8,43 @@ dashedName: problem-7-10001st-prime
|
||||
|
||||
# --description--
|
||||
|
||||
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13.
|
||||
Elencando i primi sei numeri primi: 2, 3, 5, 7, 11 e 13, possiamo vedere che il sesto numero primo è 13.
|
||||
|
||||
What is the `n`th prime number?
|
||||
Qual è l'`n`-simo numero primo?
|
||||
|
||||
# --hints--
|
||||
|
||||
`nthPrime(6)` should return a number.
|
||||
`nthPrime(6)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof nthPrime(6) === 'number');
|
||||
```
|
||||
|
||||
`nthPrime(6)` should return 13.
|
||||
`nthPrime(6)` dovrebbe restituire 13.
|
||||
|
||||
```js
|
||||
assert.strictEqual(nthPrime(6), 13);
|
||||
```
|
||||
|
||||
`nthPrime(10)` should return 29.
|
||||
`nthPrime(10)` dovrebbe restituire 29.
|
||||
|
||||
```js
|
||||
assert.strictEqual(nthPrime(10), 29);
|
||||
```
|
||||
|
||||
`nthPrime(100)` should return 541.
|
||||
`nthPrime(100)` dovrebbe restituire 541.
|
||||
|
||||
```js
|
||||
assert.strictEqual(nthPrime(100), 541);
|
||||
```
|
||||
|
||||
`nthPrime(1000)` should return 7919.
|
||||
`nthPrime(1000)` dovrebbe restituire 7919.
|
||||
|
||||
```js
|
||||
assert.strictEqual(nthPrime(1000), 7919);
|
||||
```
|
||||
|
||||
`nthPrime(10001)` should return 104743.
|
||||
`nthPrime(10001)` dovrebbe restituire 104743.
|
||||
|
||||
```js
|
||||
assert.strictEqual(nthPrime(10001), 104743);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3741000cf542c50fe87
|
||||
title: 'Problem 8: Largest product in a series'
|
||||
title: 'Problema 8: prodotto più grande in una serie'
|
||||
challengeType: 1
|
||||
forumTopicId: 302193
|
||||
dashedName: problem-8-largest-product-in-a-series
|
||||
@@ -8,7 +8,7 @@ dashedName: problem-8-largest-product-in-a-series
|
||||
|
||||
# --description--
|
||||
|
||||
The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832.
|
||||
Le quattro cifre adiacenti del numero a 1000 cifre che hanno il prodotto più grande sono 9 × 9 × 8 × 9 = 5832.
|
||||
|
||||
<div style='text-align: center;'>73167176531330624919225119674426574742355349194934</div>
|
||||
<div style='text-align: center;'>96983520312774506326239578318016984801869478851843</div>
|
||||
@@ -31,23 +31,23 @@ The four adjacent digits in the 1000-digit number that have the greatest product
|
||||
<div style='text-align: center;'>05886116467109405077541002256983155200055935729725</div>
|
||||
<div style='text-align: center;'>71636269561882670428252483600823257530420752963450</div>
|
||||
|
||||
Find the `n` adjacent digits in the 1000-digit number that have the greatest product. What is the value of this product?
|
||||
Trova le `n` cifre adiacenti nel numero a 1000 cifre che hanno il prodotto più grande. Qual è il valore di questo prodotto?
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestProductinaSeries(4)` should return a number.
|
||||
`largestProductinaSeries(4)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof largestProductinaSeries(4) === 'number');
|
||||
```
|
||||
|
||||
`largestProductinaSeries(4)` should return 5832.
|
||||
`largestProductinaSeries(4)` dovrebbe restituire 5832.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestProductinaSeries(4), 5832);
|
||||
```
|
||||
|
||||
`largestProductinaSeries(13)` should return 23514624000.
|
||||
`largestProductinaSeries(13)` dovrebbe restituire 23514624000.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestProductinaSeries(13), 23514624000);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3761000cf542c50fe88
|
||||
title: 'Problem 9: Special Pythagorean triplet'
|
||||
title: 'Problema 9: terna pitagorica speciale'
|
||||
challengeType: 1
|
||||
forumTopicId: 302205
|
||||
dashedName: problem-9-special-pythagorean-triplet
|
||||
@@ -8,35 +8,35 @@ dashedName: problem-9-special-pythagorean-triplet
|
||||
|
||||
# --description--
|
||||
|
||||
A Pythagorean triplet is a set of three natural numbers, `a` < `b` < `c`, for which,
|
||||
Una terna pitagorica è una serie di tre numeri naturali, `a` < `b` < `c` tali per cui
|
||||
|
||||
<div style='text-align: center;'><var>a</var><sup>2</sup> + <var>b</var><sup>2</sup> = <var>c</var><sup>2</sup></div>
|
||||
|
||||
For example, 3<sup>2</sup> + 4<sup>2</sup> = 9 + 16 = 25 = 5<sup>2</sup>.
|
||||
Ad esempio, 3<sup>2</sup> + 4<sup>2</sup> = 9 + 16 = 25 = 5<sup>2</sup>.
|
||||
|
||||
There exists exactly one Pythagorean triplet for which `a` + `b` + `c` = 1000. Find the product `abc` such that `a` + `b` + `c` = `n`.
|
||||
Esiste esattamente una terna pitagorica per cui `a` + `b` + `c` = 1000. Trova il prodotto `abc` tale che `a` + `b` + `c` = `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`specialPythagoreanTriplet(24)` should return a number.
|
||||
`specialPythagoreanTriplet(24)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof specialPythagoreanTriplet(24) === 'number');
|
||||
```
|
||||
|
||||
`specialPythagoreanTriplet(24)` should return 480.
|
||||
`specialPythagoreanTriplet(24)` dovrebbe restituire 480.
|
||||
|
||||
```js
|
||||
assert.strictEqual(specialPythagoreanTriplet(24), 480);
|
||||
```
|
||||
|
||||
`specialPythagoreanTriplet(120)` should return 49920, 55080 or 60000.
|
||||
`specialPythagoreanTriplet(120)` dovrebbe restituire 49920, 55080 o 60000.
|
||||
|
||||
```js
|
||||
assert([49920, 55080, 60000].includes(specialPythagoreanTriplet(120)));
|
||||
```
|
||||
|
||||
`specialPythagoreanTriplet(1000)` should return 31875000.
|
||||
`specialPythagoreanTriplet(1000)` dovrebbe restituire 31875000.
|
||||
|
||||
```js
|
||||
assert.strictEqual(specialPythagoreanTriplet(1000), 31875000);
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
これらのメソッドのいくつかは見覚えがあるでしょう。 このコードでは、`open` メソッドがリクエストを、与えられた外部リソースの URL への `POST` として初期化し、`true` ブール値を使用してそれを非同期にしています。 `setRequestHeader` メソッドは HTTP リクエストヘッダーの値を設定します。これには送信者とリクエストに関する情報が格納されています。 それは `open` メソッドより後、かつ、`send` メソッドより前に呼び出される必要があります。 この 2 つのパラメータは、ヘッダーの名前と、ヘッダーのボディーとして設定する値です。 次に、`onreadystatechange` イベントリスナーがリクエスト状態の変化を処理します。 `readyState` の `4` は操作の完了を意味し、`status` の `201` はリクエストが成功したことを意味します。 ドキュメントの HTML を更新することができます。 最後に、`send` メソッドが `body` 値を持つリクエストを送信し、ユーザーによって `userName` キーが `input` フィールドに与えられます。
|
||||
これらのメソッドのいくつかは見覚えがあるでしょう。 Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
API エンドポイントに `POST` リクエストを行うように、コードを更新してください。 次に、入力フィールドに自分の名前を入力し、`Send Message` をクリックしてください。 AJAX 関数によって、`Reply from Server will be here.` がサーバーからのデータに置き換えられる必要があります。 自分の名前に `loves cats` というテキストが追加されたものが表示されるように、レスポンスをフォーマットしてください。
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
新しい `XMLHttpRequest` を作成する必要があります。
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
`open` メソッドを使用してサーバーへの `POST` リクエストを初期化する必要があります。
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
`setRequestHeader` メソッドを使用する必要があります。
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`onreadystatechange` イベントハンドラを関数に設定する必要があります。
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
`message` クラスを持つ要素を取得し、`textContent` を `userName loves cats` に変更する必要があります。
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
`send` メソッドを使用する必要があります。
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ assert($('input[type="checkbox"]')[0]);
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
チェックボックスの右側に、`Loving` というテキストがそのまま置かれていてはいけません。 `label` 要素に囲まれている必要があります。 2 つの要素の間には必ずスペースを入れてください。
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
Você já viu vários desses métodos antes. Aqui, o método `open` inicializa a solicitação como um `POST` para um determinado URL de um recurso externo, usando o booleano `true` para torná-lo assíncrono. O método `setRequestHeader` define o valor de um cabeçalho de solicitação HTTP, que contém informações sobre o remetente e sobre a solicitação. Ele deve ser chamado após o método `open`, mas antes do método `send`. Os dois parâmetros são o nome do cabeçalho e o valor a ser definido como o corpo desse cabeçalho. Em seguida, o listener do evento `onreadystatechange` trata a mudança no estado da solicitação. Um `readyState` com o valor `4` significa que a operação foi concluída, enquanto o `status` `201` significa que a solicitação foi um sucesso. O HTML do documento pode ser atualizado. Por fim, o método `send` envia a solicitação com o valor de `body`, que era a chave `userName` fornecida pelo usuário no campo `input`.
|
||||
Você já viu vários desses métodos antes. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Atualize o código para fazer uma solicitação de `POST` para o endpoint da API. Em seguida, digite seu nome no campo de entrada e clique em `Send Message`. Sua função do AJAX deve substituir `Reply from Server will be here.` pelos dados do servidor. Formate a resposta para que ela exiba seu nome anexado ao texto `loves cats`.
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
O código deve criar uma nova `XMLHttpRequest`.
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
O código deve usar o método `open` para inicializar uma solicitação de `POST` para o servidor.
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
O código deve usar o método `setRequestHeader`.
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
O código deve ter um manipulador de evento `onreadystatechange` definido para uma função.
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
O código deve obter o elemento com a classe `message` e mudar seu `textContent` para `userName loves cats`
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
O código deve usar o método `send`.
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ A caixa de seleção deve ter o atributo `id` com o valor `loving`. Eram espera
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
O texto `Loving` não deve mais estar localizado diretamente à direita da caixa de seleção. Ele deve estar envolvido pelo elemento `label`. Certifique-se de que haja um espaço entre os dois elementos.
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -26,27 +26,33 @@ const body = JSON.stringify({ userName: userName, suffix: ' loves cats!' });
|
||||
xhr.send(body);
|
||||
```
|
||||
|
||||
Вам вже зустрічались ці методи. Ось метод `open`, який надсилає запит `POST` на URL-адресу зовнішнього ресурсу та робить його асинхронним за допомогою булевого `true`. Метод `setRequestHeader` встановлює значення заголовка запиту HTTP, в якому присутня інформація про відправника та сам запит. Використовуйте цей метод після `open`, але перед `send`. Два параметри - це назва заголовка і значення, що задається як тіло цього заголовка. Далі, за допомогою слухача подій `onreadystatechange`, змінюється стан запиту. `readyState` з `4` означає завершення операції, а `status` з `201` - успішно виконаний запит. HTML документа можна оновити. І нарешті, метод `send` надсилає запит для значення `body`. Ключ `userName` надає користувач у полі `input`.
|
||||
Вам вже зустрічались ці методи. Here the `open` method initializes the request as a `POST` to the given URL of the external resource, and passes `true` as the third parameter - indicating to perform the operation asynchronously.
|
||||
|
||||
The `setRequestHeader` method sets the value of an HTTP request header, which contains information about the sender and the request. It must be called after the `open` method, but before the `send` method. The two parameters are the name of the header and the value to set as the body of that header.
|
||||
|
||||
Next, the `onreadystatechange` event listener handles a change in the state of the request. A `readyState` of `4` means the operation is complete, and a `status` of `201` means it was a successful request. Therefore, the document's HTML can be updated.
|
||||
|
||||
Finally, the `send` method sends the request with the `body` value. The `body` consists of a `userName` and a `suffix` key.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Оновіть код, щоб надіслати запит `POST` до кінцевої точки API. Потім напишіть своє ім'я у полі вводу та натисніть кнопку `Send Message`. Функція AJAX замінить `Reply from Server will be here.` даними із сервера. Додайте до вашого імені у полі вводу текст `loves cats`.
|
||||
Update the code so it makes a `POST` request to the API endpoint. Then type your name in the input field and click `Send Message`. Your AJAX function should replace `Reply from Server will be here.` with data from the server. Format the response to display your name appended with the text `loves cats`.
|
||||
|
||||
# --hints--
|
||||
|
||||
Створіть новий `XMLHttpRequest` у коді.
|
||||
Your code should create a new `XMLHttpRequest`.
|
||||
|
||||
```js
|
||||
assert(code.match(/new\s+?XMLHttpRequest\(\s*?\)/g));
|
||||
```
|
||||
|
||||
Щоб створити запит `POST` на сервер, використайте метод `open`.
|
||||
Your code should use the `open` method to initialize a `POST` request to the server.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.open\(\s*?('|")POST\1\s*?,\s*?url\s*?,\s*?true\s*?\)/g));
|
||||
```
|
||||
|
||||
Використовуйте метод `setRequestHeader` у коді.
|
||||
Your code should use the `setRequestHeader` method.
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -56,13 +62,13 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Для того, щоб код працював, вам потрібен сет обробника подій `onreadystatechange`.
|
||||
Your code should have an `onreadystatechange` event handler set to a function.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.onreadystatechange\s*?=/g));
|
||||
```
|
||||
|
||||
У коді має бути елемент `message`, текст якого зміниться з `textContent` на `userName loves cats`
|
||||
Your code should get the element with class `message` and change its `textContent` to `userName loves cats`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@@ -72,7 +78,7 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Використовуйте метод `send` у вашому коді.
|
||||
Your code should use the `send` method.
|
||||
|
||||
```js
|
||||
assert(code.match(/\.send\(\s*?body\s*?\)/g));
|
||||
|
||||
@@ -25,14 +25,12 @@ assert($('input[type="checkbox"]')[0]);
|
||||
assert.equal($('input[type="checkbox"]')[0].id, 'loving');
|
||||
```
|
||||
|
||||
Текст `Loving` більше не повинен розташовуватися праворуч від вашого прапорця. Його слід загорнути в елемент `label`. Переконайтеся, що між двома елементами є пробіл.
|
||||
The text `Loving` should be wrapped in a `label` element.
|
||||
|
||||
```js
|
||||
const checkboxInputElem = $('input[type="checkbox"]')[0];
|
||||
assert(
|
||||
!checkboxInputElem.nextSibling.nodeValue
|
||||
.replace(/\s+/g, ' ')
|
||||
.match(/ Loving/i)
|
||||
/Loving/i.test(checkboxInputElem.nextElementSibling.innerText.replace(/\s+/g, ' '))
|
||||
);
|
||||
```
|
||||
|
||||
@@ -73,6 +71,12 @@ const labelElem = document.querySelector('label[for="loving"]');
|
||||
assert(labelElem.textContent.replace(/\s/g, '').match(/Loving/i));
|
||||
```
|
||||
|
||||
There should be a space between your checkbox and your new `label` element.
|
||||
|
||||
```js
|
||||
assert.match(code, />\s+<label\s+for\s*=\s*('|")loving/);
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
## --seed-contents--
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: build-a-data-graph-explorer
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create a multi-function calculator using Python that take input and do the following:
|
||||
У цьому завданні за допомогою Python потрібно створити багатофункціональний калькулятор, який приймає вхідні дані та виконує наступне:
|
||||
|
||||
- Get a .csv file in three ways
|
||||
- uploading it from the local computer
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: build-a-financial-calculator
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create a multi-function calculator using Python that take input and do the following:
|
||||
У цьому завданні за допомогою Python потрібно створити багатофункціональний калькулятор, який приймає вхідні дані та виконує наступне:
|
||||
|
||||
- Calculate annuity with monthly or continuous growth
|
||||
- Calculate monthly mortgage payment
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63d83ffd39c73468b059cd40
|
||||
title: "Build a Graphing Calculator"
|
||||
title: "Створіть графічний калькулятор"
|
||||
challengeType: 10
|
||||
dashedName: build-a-graphing-calculator
|
||||
---
|
||||
@@ -13,14 +13,14 @@ dashedName: build-a-graphing-calculator
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create a graphing calculator using Python that can take input and do the following:
|
||||
У цьому завданні за допомогою Python потрібно створити графічний калькулятор, який приймає вхідні дані та виконує наступне:
|
||||
|
||||
- Graph one or more functions
|
||||
- Create a table of (x,y) values
|
||||
- Shade above or below the line
|
||||
- Solve and graph a system of equations
|
||||
- Zoom in or out on a graph
|
||||
- Solve quadratic equations
|
||||
- будує графік однієї або більше функцій
|
||||
- створює таблицю значень (x, y)
|
||||
- затінює частину над/під лінією
|
||||
- розв’язує системи рівнянь та будує графік
|
||||
- збільшує/зменшує масштаб графіку
|
||||
- розв’язує квадратні рівняння
|
||||
|
||||
Якщо вам потрібна допомога, ви можете переглядати <a href="https://www.youtube.com/embed/EM0yNdZBdfQ" target="_blank" rel="noopener noreferrer nofollow">відео протягом виконання проєкту.</a>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63d83ff239c73468b059cd3f
|
||||
title: "Build a Multi-Function Calculator"
|
||||
title: "Створіть багатофункціональний калькулятор"
|
||||
challengeType: 10
|
||||
dashedName: build-a-multi-function-calculator
|
||||
---
|
||||
@@ -13,14 +13,14 @@ dashedName: build-a-multi-function-calculator
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create a multi-function calculator using Python that take input and do the following:
|
||||
У цьому завданні за допомогою Python потрібно створити багатофункціональний калькулятор, який приймає вхідні дані та виконує наступне:
|
||||
|
||||
- solve proportions
|
||||
- solve for x in equations
|
||||
- factor square roots
|
||||
- convert decimals to fractions and percents
|
||||
- convert fractions to decimals and percents
|
||||
- convert percents to decimals and fractions
|
||||
- розв’язує пропорції
|
||||
- знаходить значення х
|
||||
- обчислює квадратний корінь
|
||||
- перетворює десяткові числа у дроби та відсотки
|
||||
- перетворює дроби у десяткові числа та відсотки
|
||||
- перетворює відсотки у десяткові числа та дроби
|
||||
|
||||
Якщо вам потрібна допомога, ви можете переглядати <a href="https://www.youtube.com/embed/PdsvcZNPEEs" target="_blank" rel="noopener noreferrer nofollow">відео протягом виконання проєкту.</a>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: build-three-math-games
|
||||
|
||||
# --instructions--
|
||||
|
||||
For this challenge, you need to create three math games using Python that do the following:
|
||||
У цьому завданні за допомогою Python потрібно створити три математичні ігри, які виконують наступне:
|
||||
|
||||
- Scatter plot game
|
||||
- Randomly generate points on a graph and the player has to input the (x,y) coordinates
|
||||
|
||||
@@ -30,7 +30,7 @@ Importing data from Google Sheets
|
||||
|
||||
---
|
||||
|
||||
All of the above
|
||||
Усе перелічене вище
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d23a9078df117ce4c3ff
|
||||
title: "Applications of Linear Systems: Extra"
|
||||
title: "Застосування лінійних систем: додатково"
|
||||
challengeType: 15
|
||||
videoId: ZtypoUnNdAY
|
||||
dashedName: applications-of-linear-systems-extra
|
||||
@@ -8,29 +8,29 @@ dashedName: applications-of-linear-systems-extra
|
||||
|
||||
# --description--
|
||||
|
||||
The next video contains more examples of how to set up equations and use your Colab notebook to solve them.
|
||||
Наступне відео містить більше прикладів того, як налаштувати рівняння та розв’язати їх за допомогою блокнота Colab.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
How can you make use of a Colab notebook to solve practical business problems?
|
||||
Як можна використати блокнот Colab, щоб розв’язати практичне бізнес-завдання?
|
||||
|
||||
## --answers--
|
||||
|
||||
Modify the equations in the code you already wrote
|
||||
Змінити рівняння у написаному коді
|
||||
|
||||
---
|
||||
|
||||
Copy your existing code and then modify it as necessary
|
||||
Зробити копію наявного коду та змінити його у разі потреби
|
||||
|
||||
---
|
||||
|
||||
Write new code based on the functions you already know
|
||||
Написати новий код, базуючись на вже відомих функціях
|
||||
|
||||
---
|
||||
|
||||
All of the above
|
||||
Усе перелічене вище
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2019078df117ce4c3fe
|
||||
title: "Word Problems"
|
||||
title: "Текстові задачі"
|
||||
challengeType: 15
|
||||
videoId: 3ZM3XMn1QYo
|
||||
dashedName: word-problems
|
||||
@@ -8,27 +8,27 @@ dashedName: word-problems
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will look at key words that tell you what math operation to use. Then you will see how to apply some of your code to different problems.
|
||||
У першому відео розглядаються ключові слова для кожної математичної операції. Потім ви побачите, як застосувати код до різних виразів.
|
||||
|
||||
**Here are links to the textbooks you will need to complete the assignments for this video:**
|
||||
**Ось посилання на підручники, з яких вам потрібно виконати завдання:**
|
||||
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Business Math, a Step-by-Step Handbook (2021) by Jean-Paul Oliver</a>
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Бізнес-математика: покроковий довідник (2021). Жан-Пол Олівер</a>
|
||||
|
||||
\- <a href="https://openstax.org/details/books/algebra-and-trigonometry" target="_blank" rel="noopener noreferrer nofollow">Algebra and Trigonometry by Jay Abramson</a>
|
||||
\- <a href="https://openstax.org/details/books/algebra-and-trigonometry" target="_blank" rel="noopener noreferrer nofollow">Алгебра та тригонометрія. Джей Абрамсон</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the problems on pages 63, 75, 85, and 118 from "Business Math, a Step-by-Step Handbook (2021)".
|
||||
Розв’яжіть завдання на ст. 63, 75, 85 та 118 з підручника «Бізнес-математика: покроковий довідник (2021)».
|
||||
|
||||
---
|
||||
|
||||
Complete the problems on pages 304, 308, and 321 from "Algebra and Trigonometry".
|
||||
Розв’яжіть завдання на ст. 304, 308 та 321 з підручника «Алгебра та тригонометрія».
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following key words indicate subtraction?
|
||||
Які з перелічених ключових слів вказують на віднімання?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63dbd0375d93712ff177d969
|
||||
title: "Business Applications of College Algebra: Extra"
|
||||
title: "Прикладне застосування алгебри у бізнесі: додатково"
|
||||
challengeType: 15
|
||||
videoId: 9n_ZybF0Phc
|
||||
dashedName: business-applications-of-college-algebra-extra
|
||||
@@ -8,29 +8,29 @@ dashedName: business-applications-of-college-algebra-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This video is showing you some economics applications, and creating graphs and formulas.
|
||||
Це відео показує деякі застосування в економіці, а також створення графіків й формул.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is not true of supply and demand graphs?
|
||||
Яке з перелічених тверджень щодо графіків пропозиції та попиту неправильне?
|
||||
|
||||
## --answers--
|
||||
|
||||
The supply curve has a positive slope
|
||||
Крива пропозиції має позитивний кутовий коефіцієнт
|
||||
|
||||
---
|
||||
|
||||
The demand curve has a negative slope
|
||||
Крива пропозиції має негативний кутовий коефіцієнт
|
||||
|
||||
---
|
||||
|
||||
The supply curve and demand curve will intersect
|
||||
Крива пропозиції та крива попиту будуть перетинатися
|
||||
|
||||
---
|
||||
|
||||
The supply curve and demand curve will always be straight lines
|
||||
Крива пропозиції та крива попиту завжди будуть прямими лініями
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2649078df117ce4c404
|
||||
title: "Demand and Revenue"
|
||||
title: "Попит та дохід"
|
||||
challengeType: 15
|
||||
videoId: 8PIZmiMFmfk
|
||||
dashedName: demand-and-revenue
|
||||
@@ -8,39 +8,39 @@ dashedName: demand-and-revenue
|
||||
|
||||
# --description--
|
||||
|
||||
In this video, you will write code to develop a demand function from two points. You will see how price affects the profit graph and how all of these equations relate to each other.
|
||||
У цьому відео ви напишете код, щоб побудувати функцію попиту з двох точок. Ви побачите, як ціна впливає на графік прибутку і те, як взаємодіють усі рівняння.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1foxkSd90q1tHCSqyY6NFAEnMfH0nNwXe?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1foxkSd90q1tHCSqyY6NFAEnMfH0nNwXe?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
**Here is a link to the textbook you will need to complete the assignment for this video:**
|
||||
**Ось посилання на підручник, з якого вам потрібно виконати завдання:**
|
||||
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Business Math, a Step-by-Step Handbook (2021) by Jean-Paul Oliver</a>
|
||||
\- <a href="https://lyryx.com/subjects/business/business-mathematics/" target="_blank" rel="noopener noreferrer nofollow">Бізнес-математика: покроковий довідник (2021). Жан-Пол Олівер</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the problems on pages 155 and 163 from "Business Math, a Step-by-Step Handbook (2021)".
|
||||
Розв’яжіть завдання на ст. 155 та 163 з підручника «Бізнес-математика: покроковий довідник (2021)».
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following business equations is not correct?
|
||||
Яке з перелічених бізнес-рівнянь неправильне?
|
||||
|
||||
## --answers--
|
||||
|
||||
Profit = Revenue - Cost
|
||||
прибуток = дохід - витрати
|
||||
|
||||
---
|
||||
|
||||
Revenue = Price * Demand
|
||||
дохід = ціна * попит
|
||||
|
||||
---
|
||||
|
||||
Cost = Fixed Expenses + Variable Expenses
|
||||
ціна = фіксовані витрати + змінні витрати
|
||||
|
||||
---
|
||||
|
||||
Marginal Revenue = Margins + Revenue
|
||||
граничний дохід = маржі + дохід
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d251b51aeedd1a2bd648
|
||||
title: "Factoring"
|
||||
title: "Розкладання на множники"
|
||||
challengeType: 15
|
||||
videoId: Puyp_-ZYA54
|
||||
dashedName: factoring
|
||||
@@ -8,31 +8,31 @@ dashedName: factoring
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will show you how to find common factors and divide them out - in writing, then in code using loops and modulus operations.
|
||||
Перше відео покаже, як знайти спільні множники та скорочувати їх письмово. Потім ви дізнаєтесь, як це зробити у коді за допомогою циклів та операцій modulo.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1tB7N3QqHEbGk33v0BdTwZTVkS9ju9yn6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1tB7N3QqHEbGk33v0BdTwZTVkS9ju9yn6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What does the modulus (`%`) operator do in Python?
|
||||
Що робить оператор modulo (`%`) у Python?
|
||||
|
||||
## --answers--
|
||||
|
||||
returns the percent
|
||||
повертає відсоток
|
||||
|
||||
---
|
||||
|
||||
divides
|
||||
ділить
|
||||
|
||||
---
|
||||
|
||||
returns the remainder when dividing
|
||||
повертає остачу від ділення
|
||||
|
||||
---
|
||||
|
||||
creates a space
|
||||
створює пропуск
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2769078df117ce4c406
|
||||
title: "Exponents and Logarithms"
|
||||
title: "Піднесення до степеня та логарифми"
|
||||
challengeType: 15
|
||||
videoId: LhzmzugFFu8
|
||||
dashedName: exponents-and-logarithms
|
||||
@@ -8,13 +8,13 @@ dashedName: exponents-and-logarithms
|
||||
|
||||
# --description--
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1hg7ecxGT20B8HR2mV75HzMylj9SHIWH8?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1hg7ecxGT20B8HR2mV75HzMylj9SHIWH8?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What is log<sub>5</sub>(25)?
|
||||
Що таке log<sub>5</sub>(25)?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d258b51aeedd1a2bd649
|
||||
title: "Converting Fractions and Decimals"
|
||||
title: "Перетворення дробів та десяткових чисел"
|
||||
challengeType: 15
|
||||
videoId: hVHWr4KXZn0
|
||||
dashedName: converting-fractions-and-decimals
|
||||
@@ -8,35 +8,35 @@ dashedName: converting-fractions-and-decimals
|
||||
|
||||
# --description--
|
||||
|
||||
The first video will show you how to convert between fractions, decimals, and percents on paper. Then, it will show you how to do it with Python code.
|
||||
У першому відео покажуть, як перетворювати дроби, десяткові числа та відсотки на папері. Потім ви побачите, як зробити те саме за допомогою Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1dgeEEODP7cwm_96_JqbjxxJhVpZcFfGe?usp=sharing#scrollTo=NkMTAVF0BlqE" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in the video.</a> Use this code as a model, and write your own code to convert fractions and decimals.
|
||||
Ось <a href="https://colab.research.google.com/drive/1dgeEEODP7cwm_96_JqbjxxJhVpZcFfGe?usp=sharing#scrollTo=NkMTAVF0BlqE" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab, використаний у цьому відео.</a> Використайте цей код як модель та напишіть власний код для перетворення дробів та десяткових чисел.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add the code to convert fractions and decimals to your algebra Colab notebook.
|
||||
Додайте код для перетворення дробів та десяткових чисел до свого блокноту Colab.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following correctly represents "three hundredths" as a decimal?
|
||||
Що з переліченого правильно позначає «три сотні» у вигляді десяткового числа?
|
||||
|
||||
## --answers--
|
||||
|
||||
0.3
|
||||
0,3
|
||||
|
||||
---
|
||||
|
||||
0.03
|
||||
0,03
|
||||
|
||||
---
|
||||
|
||||
0.003
|
||||
0,003
|
||||
|
||||
---
|
||||
|
||||
100.3
|
||||
100,3
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d260b51aeedd1a2bd64a
|
||||
title: "Fractions and Decimals: Extra"
|
||||
title: "Дроби та десяткові числа: додатково"
|
||||
challengeType: 15
|
||||
videoId: YHVA6cYIglM
|
||||
dashedName: fractions-and-decimals-extra
|
||||
@@ -8,23 +8,23 @@ dashedName: fractions-and-decimals-extra
|
||||
|
||||
# --description--
|
||||
|
||||
The following video will show you one way to set up your Google Colaboratory notebook, so that you can continue to build your personalized algebra calculator.
|
||||
Наступне відео покаже, як налаштувати блокнот Google Colaboratory, щоб ви могли продовжити будувати свій калькулятор.
|
||||
|
||||
Here is <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">the Colab notebook used in this video</a> so you can use it as a model.
|
||||
Ось <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab, використаний у цьому відео</a>. Ви можете використати його як модель.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add the code to factor and solve for a variable to your algebra Colab notebook.
|
||||
Додайте код для розкладу на множники та розв’язку змінної до свого блокнота Colab.
|
||||
|
||||
---
|
||||
|
||||
Run the code in the following notebook to get <a href="https://colab.research.google.com/drive/1qON4GYbMkaZJA7MYd7-RcDROOkuuBJg9?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">practice converting fractions and decimals.</a> As a bonus, look at the code used to generate the practice problems.
|
||||
Запустіть код у наступному блокноті, щоб попрактикуватись <a href="https://colab.research.google.com/drive/1qON4GYbMkaZJA7MYd7-RcDROOkuuBJg9?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">перетворювати дроби та десяткові числа.</a> Як бонус, гляньте на код, який генерує приклади для практики.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following languages can you not use in Google Colaboratory?
|
||||
Яку з перелічених мов не можна використовувати у Google Colaboratory?
|
||||
|
||||
## --answers--
|
||||
|
||||
@@ -36,11 +36,11 @@ LaTex
|
||||
|
||||
---
|
||||
|
||||
English
|
||||
Англійську мову
|
||||
|
||||
---
|
||||
|
||||
Sanskrit
|
||||
Санскрит
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63e1798f811fda1bc546bba0
|
||||
title: "Functions and Graphing: Extra"
|
||||
title: "Функції та побудова графіка: додатково"
|
||||
challengeType: 15
|
||||
videoId: N7Fh1xKrIM4
|
||||
dashedName: functions-and-graphing-extra
|
||||
@@ -8,19 +8,19 @@ dashedName: functions-and-graphing-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This next video will show you the connection between functions and graphing. Notice how the graph is a way to represent the inputs and outputs of a function. Then the video will show you how to graph a function with Python.
|
||||
У наступному відео розглядається зв’язок між функціями та графіками. Зверніть увагу, що завдяки графіку можна зобразити вхідні та вихідні дані функції. Потім ви побачите, як побудувати графік функції за допомогою Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go with this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignemnts--
|
||||
|
||||
Add code to your algebra Colab notebook for functions and graphing.
|
||||
Додайте код до свого блокнота Colab для функцій та графіків.
|
||||
|
||||
## --text--
|
||||
|
||||
What Python library would you import to create arrays that you can graph?
|
||||
Яку бібліотеку Python ви б імпортували, щоб створити масиви, з яких можна побудувати графік?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d266b51aeedd1a2bd64b
|
||||
title: "Functions"
|
||||
title: "Функції"
|
||||
challengeType: 15
|
||||
videoId: rYg12-omcGg
|
||||
dashedName: functions
|
||||
@@ -8,19 +8,19 @@ dashedName: functions
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will show you what it means to be a function, and then it will show you how math functions and Python functions are similar.
|
||||
Перше відео розповість, що ж таке функція, а також чим схожі функції у математиці та Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1d0e55NoKjKILIum34POv04h0OLpE_pkn" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this and the next videos.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1d0e55NoKjKILIum34POv04h0OLpE_pkn" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab, використаний у цьому та наступних відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assigment--
|
||||
|
||||
Add code to your algebra Colab notebook that creates Python functions for decimal-to-fraction conversions
|
||||
Додайте код до свого блокнота Colab, який створює функції для перетворення десяткових чисел у дроби у Python.
|
||||
|
||||
## --text--
|
||||
|
||||
After defining a function in Python, indent each line of the function how many spaces?
|
||||
На скільки пробілів потрібно робити відступ для кожного рядка функції, визначивши її у Python?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d26fb51aeedd1a2bd64c
|
||||
title: "Graphing"
|
||||
title: "Побудова графіку"
|
||||
challengeType: 15
|
||||
videoId: vUefCkh8-wc
|
||||
dashedName: graphing
|
||||
@@ -8,23 +8,23 @@ dashedName: graphing
|
||||
|
||||
# --description--
|
||||
|
||||
This next video will show you the connection between functions and graphing. Notice how the graph is a way to represent the inputs and outputs of a function. Then the video will show you how to graph a function with Python.
|
||||
У наступному відео розглядається зв’язок між функціями та графіками. Зверніть увагу, що завдяки графіку можна зобразити вхідні та вихідні дані функції. Потім ви побачите, як побудувати графік функції за допомогою Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go with the last two videos</a> so you can start making your own graphs.
|
||||
Ось <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для двох останніх відео</a>, щоб ви могли побудувати власні графіки.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignemnts--
|
||||
|
||||
Add code to your algebra Colab notebook for functions and graphing.
|
||||
Додайте код до свого блокнота Colab для функцій та графіків.
|
||||
|
||||
---
|
||||
|
||||
Run the following notebook to see <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">more ways to create graphs using algebra and Python.</a>
|
||||
Запустіть наступний код, щоб побачити <a href="https://colab.research.google.com/drive/1UYorWd9-Btf_ZQyA9YdUzxzKR8rnVrSV#scrollTo=yJiVB8wdHRxS" target="_blank" rel="noopener noreferrer nofollow">більше способів побудови графіків з використанням алгебри та Python.</a>
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following would put a blue line on a graph?
|
||||
Що з переліченого додасть синю лінію на графік?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d25c9078df117ce4c403
|
||||
title: "Parent Graphs and Polynomials: Extra"
|
||||
title: "Батьківські графіки та многочлени: додатково"
|
||||
challengeType: 15
|
||||
videoId: YDlXmmRgQJI
|
||||
dashedName: parent-graphs-and-polynomials-extra
|
||||
@@ -8,15 +8,15 @@ dashedName: parent-graphs-and-polynomials-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This next video will show you how to add sliders to your graphs, to see them change in real time. You will also see ways to use loops to find the roots of a graph, and how this method is different from factoring.
|
||||
Наступне відео покаже, як додати слайдери до графіків, щоб бачити зміни в реальному часі. Ви також побачите способи використання циклів для того, щоб знайти корені графіка та дізнаєтесь, чим цей метод відрізняється від розкладання на множники.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1bspkmQVcKOXUuk-Orb0Mwl0GUGbqMpka?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1bspkmQVcKOXUuk-Orb0Mwl0GUGbqMpka?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
How many sliders would you add to change the coefficients in a quadratic graph?
|
||||
Скільки слайдерів ви б додали, щоб змінити коефіцієнти у графіку квадратичної функції?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2529078df117ce4c402
|
||||
title: "Parent Graphs"
|
||||
title: "Батьківські графіки"
|
||||
challengeType: 15
|
||||
videoId: 6S2QhY8rIcw
|
||||
dashedName: parent-graphs
|
||||
@@ -8,15 +8,15 @@ dashedName: parent-graphs
|
||||
|
||||
# --description--
|
||||
|
||||
In this video, you will see what these parent graphs look like, how to modify them, and how to do this all with Python code.
|
||||
У цьому відео ви побачите, як виглядають батьківські графіки та як їх змінювати, а також як це зробити за допомогою Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1uwKuaHCC2WCUFKmXW-5NqWUlEP9ak7Pz?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1uwKuaHCC2WCUFKmXW-5NqWUlEP9ak7Pz?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
In numpy, what is the cube root of x?
|
||||
Що є кубічним коренем x у numpy?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2429078df117ce4c400
|
||||
title: "Quadratics"
|
||||
title: "Квадратні рівняння"
|
||||
challengeType: 15
|
||||
videoId: pPLBL3L0OGg
|
||||
dashedName: quadratics
|
||||
@@ -8,23 +8,23 @@ dashedName: quadratics
|
||||
|
||||
# --description--
|
||||
|
||||
This video show you how to solve quadratic equations, and explain the coefficients ("A," "B," and "C") in the standard form and how to use them to find the roots and vertex.
|
||||
Це відео покаже, як розв’язати квадратне рівняння, а також пояснить коефіцієнти (a, b, c) у стандартній формі та як використати їх, щоб знайти корені й вершину.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1jr_k4awSSW1CBs9ma9oS_WnDblDjX3pc?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go along with this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1jr_k4awSSW1CBs9ma9oS_WnDblDjX3pc?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
In Python code, what is the formula for the x value of the vertex?
|
||||
Якою є формула для знаходження значення х вершини у Python?
|
||||
|
||||
## --answers--
|
||||
|
||||
x = -b/2a
|
||||
х = -b/2a
|
||||
|
||||
---
|
||||
|
||||
x = -b/(2 * a)
|
||||
x = -b/(2 * а)
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user