mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-06 06:01:31 -05:00
chore(i18n,learn): processed translations (#49981)
This commit is contained in:
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
ستحتاج أحيانًا إلى اختبار أكثر من شيء في وقت واحد. مشغل <dfn>الإضافة المنطقي</dfn> ورمزه (`&&`) يرجع `true` فقط إذا كان <dfn>المعاملتين</dfn> إلى اليسار واليمين صحيحين.
|
||||
|
||||
ويمكن تحقيق نفس التأثير عن طريق وضع عبارة if داخل if أخري:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
سوف يعيد `Yes` فقط إذا كان `num` أكبر من `5` وأقل من `10`. ويمكن كتابة نفس المنطق كما يلي:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: comparisons-with-the-logical-or-operator
|
||||
|
||||
يتكون مشغل <dfn>إي من</dfn> من رمزين و هما خطين مستقيمين كالآتي: (`||`). يمكن العثور على هذا الرمز عادة بين مفاتيح Backspace و Enter.
|
||||
|
||||
يجب أن يبدو النمط أدناه مألوفًا من الدروس السابقة:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
سوف يعيد `Yes` فقط إذا كان `num` بين `5` و `10` (5 و 10 مشمولين). ويمكن كتابة نفس المنطق كما يلي:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
HTML <dfn>attributes</dfn> اي السمات، هي كلمات خاصة تستخدم داخل opening tag لعنصر للتحكم في سلوك العنصر. السمة `src` في عنصر `img` تحدد عنوان URL للصورة (حيث توجد الصورة). مثال على عنصر `img` باستخدام `src` كسمة: `<img src="https://www.example.com/the-image.jpg">`.
|
||||
HTML <dfn>attributes</dfn> اي السمات، هي كلمات خاصة تستخدم داخل opening tag لعنصر للتحكم في سلوك العنصر. السمة `src` في عنصر `img` تحدد عنوان URL للصورة (حيث توجد الصورة).
|
||||
|
||||
داخل عنصر `img` الموجود، أضف خاصية `src` مع هذا الرابط:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
الكود الخاص بك يجب أن يحتوي على عنصر `img`. ربما تكون قد قمت بإزالة عنصر `img` أو لم تحيط قيمة سمة `src` بعلامات الاقتباس.
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
يجب أن يحتوي عنصر `img` الخاص بك علي سمة `src`. إما أنك حذفت السمة أو لديك خطأ إملائي. تأكد من وجود مسافة بين اسم العنصر واسم السمة.
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
يجب تعيين عنصر `img` الخاص بك سمة `src` بقيمة '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. إما أنك حذفت الـ URL أو لديك خطأ إملائي. حالة (case) عنوان الـ URL مهمة.
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
على الرغم من أنك قمت بتعيين عنصر `img` سمة `src` إلى عنوان الـ URL الصحيح، يوصى بأن تحيط دائما قيمة السمة بعلامات اقتباس.
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ assert.exists(new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type'))
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
有時你需要在一次判斷中做多個操作。 當且僅當<dfn>運算符</dfn>的左邊和右邊都是 true,<dfn>邏輯與</dfn>運算符(`&&`)纔會返回 `true`。
|
||||
|
||||
同樣的效果可以通過 if 語句的嵌套來實現:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
只有當 `num` 的值大於 `5` 並且小於`10` 時纔會返回 `Yes`。 相同的邏輯可被寫爲:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: comparisons-with-the-logical-or-operator
|
||||
|
||||
<dfn>邏輯或</dfn>運算符由兩個豎線(`||`)組成。 這個按鍵位於退格鍵和回車鍵之間。
|
||||
|
||||
下面這樣的語句你應該很熟悉:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
只有當 `num` 大於等於 `5` 或小於等於 `10` 時,函數才返回 `Yes`。 相同的邏輯可以簡寫成:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
HTML <dfn>屬性</dfn>是寫在一個元素的開始標籤中的特殊詞彙,它們用於控制這個元素的行爲。 在 `img` 元素中的 `src` 屬性明確了一個圖片的 URL(圖片所在的位置)。 使用 `src` 屬性的 `img` 元素示例:`<img src="https://www.example.com/the-image.jpg">`。
|
||||
HTML <dfn>屬性</dfn>是寫在一個元素的開始標籤中的特殊詞彙,它們用於控制這個元素的行爲。 在 `img` 元素中的 `src` 屬性明確了一個圖片的 URL(圖片所在的位置)。
|
||||
|
||||
在現有的 `img` 元素中,添加具有以下 URL 的 `src` 屬性:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
你的代碼應該有一個 `img` 元素。 你可能已經刪除了 `img` 元素,或者你沒有用引號將 `src` 屬性的值括起來。
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
你的 `img` 元素應該有一個 `src` 屬性。 你要麼省略了該屬性,要麼有錯字。 請確保元素名稱和屬性名稱之間有一個空格。
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
你的 `img` 元素的 `src` 屬性應設置爲 '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'。 你可能省略了這個 URL 或者有拼寫錯誤。 URL 的大小寫很重要。
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
儘管你已將 `img` 元素的 `src` 設置爲正確的 URL,但建議始終用引號將屬性的值括起來。
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ assert.exists(new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type'))
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
有时你需要在一次判断中做多个操作。 当且仅当<dfn>运算符</dfn>的左边和右边都是 true,<dfn>逻辑与</dfn>运算符(`&&`)才会返回 `true`。
|
||||
|
||||
同样的效果可以通过 if 语句的嵌套来实现:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
只有当 `num` 的值大于 `5` 并且小于`10` 时才会返回 `Yes`。 相同的逻辑可被写为:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: comparisons-with-the-logical-or-operator
|
||||
|
||||
<dfn>逻辑或</dfn>运算符由两个竖线(`||`)组成。 这个按键位于退格键和回车键之间。
|
||||
|
||||
下面这样的语句你应该很熟悉:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
只有当 `num` 大于等于 `5` 或小于等于 `10` 时,函数才返回 `Yes`。 相同的逻辑可以简写成:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
HTML <dfn>属性</dfn>是写在一个元素的开始标签中的特殊词汇,它们用于控制这个元素的行为。 在 `img` 元素中的 `src` 属性明确了一个图片的 URL(图片所在的位置)。 使用 `src` 属性的 `img` 元素示例:`<img src="https://www.example.com/the-image.jpg">`。
|
||||
HTML <dfn>属性</dfn>是写在一个元素的开始标签中的特殊词汇,它们用于控制这个元素的行为。 在 `img` 元素中的 `src` 属性明确了一个图片的 URL(图片所在的位置)。
|
||||
|
||||
在现有的 `img` 元素中,添加具有以下 URL 的 `src` 属性:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
你的代码应该有一个 `img` 元素。 你可能已经删除了 `img` 元素,或者你没有用引号将 `src` 属性的值括起来。
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
你的 `img` 元素应该有一个 `src` 属性。 你要么省略了该属性,要么有错字。 请确保元素名称和属性名称之间有一个空格。
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
你的 `img` 元素的 `src` 属性应设置为 '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'。 你可能省略了这个 URL 或者有拼写错误。 URL 的大小写很重要。
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
尽管你已将 `img` 元素的 `src` 设置为正确的 URL,但建议始终用引号将属性的值括起来。
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ assert.exists(new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type'))
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
A veces tendrás que probar más de una cosa a la vez. El operador <dfn>lógico and</dfn> (`&&`) devuelve `true` si y solo si los <dfn>operandos</dfn> a la izquierda y a la derecha son verdaderos.
|
||||
|
||||
El mismo efecto se podría lograr anidando una sentencia if dentro de otra sentencia if:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
solo devolverá `Yes` si `num` es mayor que `5` y menor que `10`. La misma lógica se puede escribir como:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ El operador <dfn>lógico or</dfn> (`||`) devuelve `true` si cualquiera de los <d
|
||||
|
||||
El operador <dfn>lógico or</dfn> se compone de dos símbolos de barra vertical: (`||`). Este se puede encontrar normalmente entre las teclas de tabulación y escape.
|
||||
|
||||
El patrón de abajo debería parecer familiar desde los puntos de referencia anteriores:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
devolverá `Yes` sólo si `num` está entre `5` y `10` (5 y 10 incluidos). La misma lógica se puede escribir como:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
Los <dfn>atributos</dfn> HTML son palabras especiales usadas dentro de la etiqueta de apertura de un elemento para controlar el comportamiento del elemento. El atributo `src` en un elemento `img` especifica la URL (donde se localiza la imagen). Un ejemplo de un elemento `img` usando un atributo `src`: `<img src="https://www.example.com/the-image.jpg">`.
|
||||
Los <dfn>atributos</dfn> HTML son palabras especiales usadas dentro de la etiqueta de apertura de un elemento para controlar el comportamiento del elemento. El atributo `src` en un elemento `img` especifica la URL (donde se localiza la imagen).
|
||||
|
||||
Dentro del elemento `img` existente, añade un atributo `src` con esta URL:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
Tu código debe tener un elemento `img`. Pudiste haber borrado el elemento `img` o no pusiste entre comillas el valor del atributo `src`.
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
Tu elemento `img` debe tener un atributo `src`. Probablemente no has añadido el atributo o tienes un error tipográfico. Asegúrate e de que hay un espacio entre el nombre del elemento y el nombre del atributo.
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
El atributo `src` del elemento `img` debe tener el valor '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. Probablemente no has añadido la URL o tienes un error tipográfico. La URL debe ser exactamente igual, cuidando mayúsculas y minúsculas.
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
Aunque le has dado la URL correcta al atributo `src` del elemento `img`, se recomienda siempre poner el valor de un atributo entre comillas.
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ Tu `fieldset:last-of-type` debe tener `border-bottom` establecido como `none`.
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
Manchmal musst du mehr als eine Sache auf einmal testen. Der <dfn>logische Und</dfn>-Operator (`&&`) gibt `true` zurück, wenn und nur wenn die <dfn>Operanden</dfn> links und rechts von ihm wahr sind.
|
||||
|
||||
Den gleichen Effekt kannst du erzielen, indem du eine if-Anweisung in eine andere if-Anweisung verschachtelst:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
gibt nur `Yes` zurück, wenn `num` größer als `5` und kleiner als `10` ist. Die gleiche Logik lässt sich wie folgt formulieren:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ Der <dfn>logische Oder</dfn>-Operator (`||`) gibt `true` zurück, wenn einer der
|
||||
|
||||
Der <dfn>logische Oder</dfn>-Operator besteht aus zwei Pipe-Symbolen: (`||`). Diese befindet sich normalerweise zwischen der Backspace- und der Enter-Taste.
|
||||
|
||||
Das folgende Muster sollte dir von früheren Hinweisen bekannt vorkommen:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
gibt nur dann `Yes` zurück, wenn `num` zwischen `5` und `10` liegt (einschließlich 5 und 10). Die gleiche Logik lässt sich wie folgt formulieren:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,7 +7,13 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
HTML <dfn>attributes</dfn> are special words used inside the opening tag of an element to control the element's behavior. The `src` attribute in an `img` element specifies the image's URL (where the image is located). An example of an `img` element using an `src` attribute: `<img src="https://www.example.com/the-image.jpg">`.
|
||||
HTML <dfn>attributes</dfn> are special words used inside the opening tag of an element to control the element's behavior. The `src` attribute in an `img` element specifies the image's URL (where the image is located).
|
||||
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
@@ -27,7 +33,7 @@ Your `img` element should have an `src` attribute. You have either omitted the a
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. Die Groß- und Kleinschreibung der URL ist wichtig.
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
|
||||
@@ -27,7 +27,7 @@ Your `fieldset:last-of-type` should have `border-bottom` set as `none`.
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
A volte dovrai testare più di una cosa alla volta. L'operatore logico <dfn>and</dfn> (`&&`) restituisce `true` se e solo se gli <dfn>operandi</dfn> a sinistra e a destra di esso sono veri.
|
||||
|
||||
Lo stesso effetto può essere ottenuto annidando un'istruzione if all'interno di un altro if:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
restituirà `Yes` solo se `num` è maggiore di `5` e minore a `10`. La stessa logica può essere scritta come:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ L'operatore <dfn>Or logico</dfn> (`||`) restituisce `true` se uno degli <dfn>ope
|
||||
|
||||
L'operatore <dfn>or logico</dfn> è composto da due simboli "pipe": (`||`). Questo in genere può essere trovato tra i tuoi tasti Backspace e Enter.
|
||||
|
||||
Lo schema sottostante dovrebbe esserti familiare dai punti visti in precedenza:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
Esso restituirà `Yes` solo se `num` è compreso tra `5` e `10` (5 e 10 inclusi). La stessa logica può essere scritta come:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
Gli <dfn>attributi</dfn> HTML sono parole speciali utilizzate all'interno del tag di apertura di un elemento per controllarne il comportamento. L'attributo `src` in un elemento `img` specifica l'URL dell'immagine (dove l'immagine è localizzata). Un esempio di un elemento `img` con un attributo `src` è: `<img src="https://www.example.com/the-image.jpg">`.
|
||||
Gli <dfn>attributi</dfn> HTML sono parole speciali utilizzate all'interno del tag di apertura di un elemento per controllarne il comportamento. L'attributo `src` in un elemento `img` specifica l'URL dell'immagine (dove l'immagine è localizzata).
|
||||
|
||||
Aggiungi un attributo `src` all'elemento `img` esistente con il seguente URL:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
Il codice dovrebbe avere un elemento `img`. Potresti aver rimosso l'elemento `img` o non hai circondato il valore dell'attributo `src` con le virgolette.
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
L'elemento `img` dovrebbe avere un attributo `src`. Hai omesso l'attributo o hai un refuso. Assicurati che ci sia uno spazio tra il nome dell'elemento e il nome dell'attributo.
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
L'attributo `src` dell'elemento `img` dovrebbe essere '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. Hai omesso l'URL o hai un refuso. Le maiuscole/minuscole nell'URL sono importanti.
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
Anche se hai impostato l'URL corretto per l'`src` dell'elemento `img`, è raccomandato circondare sempre il valore di un attributo con le virgolette.
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ L'elemento `fieldset:last-of-type` dovrebbe avere un `border-bottom` con il valo
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63dbd0375d93712ff177d969
|
||||
title: "Business Applications of College Algebra: Extra"
|
||||
title: "Applicazioni Economiche dell'Algebra Universitaria: Extra"
|
||||
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.
|
||||
Questo video mostra alcune applicazioni economiche e la creazione di grafici e formule.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is not true of supply and demand graphs?
|
||||
Quale delle seguenti affermazioni non è vera per i grafici dell'offerta e della domanda?
|
||||
|
||||
## --answers--
|
||||
|
||||
The supply curve has a positive slope
|
||||
La curva dell'offerta ha una pendenza positiva
|
||||
|
||||
---
|
||||
|
||||
The demand curve has a negative slope
|
||||
La curva della domanda ha una pendenza negativa
|
||||
|
||||
---
|
||||
|
||||
The supply curve and demand curve will intersect
|
||||
La curva dell'offerta e la curva della domanda si intersecano
|
||||
|
||||
---
|
||||
|
||||
The supply curve and demand curve will always be straight lines
|
||||
La curva dell'offerta e la curva della domanda sono sempre rette
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2649078df117ce4c404
|
||||
title: "Demand and Revenue"
|
||||
title: "Domanda e Ricavo"
|
||||
challengeType: 15
|
||||
videoId: 8PIZmiMFmfk
|
||||
dashedName: demand-and-revenue
|
||||
@@ -8,11 +8,11 @@ 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.
|
||||
In questo video, scriverai il codice per sviluppare una funzione di domanda da due punti. Vedrai come il prezzo influenza il grafico del profitto e come tutte queste equazioni sono collegate l'una con l'altra.
|
||||
|
||||
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:**
|
||||
**Ed ecco il link al libro di testo che ti servirà 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) di Jean-Paul Oliver</a>
|
||||
|
||||
@@ -20,27 +20,27 @@ Ecco il <a href="https://colab.research.google.com/drive/1foxkSd90q1tHCSqyY6NFAE
|
||||
|
||||
## --assignment--
|
||||
|
||||
Complete the problems on pages 155 and 163 from "Business Math, a Step-by-Step Handbook (2021)".
|
||||
Completa i problemi alle pagine 155 e 163 da "Business Math, a Step-by-Step Handbook (2021)".
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following business equations is not correct?
|
||||
Quale delle seguenti equazioni di bilancio non è corretta?
|
||||
|
||||
## --answers--
|
||||
|
||||
Profit = Revenue - Cost
|
||||
Profitto = Ricavo - Costo
|
||||
|
||||
---
|
||||
|
||||
Revenue = Price * Demand
|
||||
Ricavo = Prezzo * Domanda
|
||||
|
||||
---
|
||||
|
||||
Cost = Fixed Expenses + Variable Expenses
|
||||
Costo = Spese Fisse + Spese Variabili
|
||||
|
||||
---
|
||||
|
||||
Marginal Revenue = Margins + Revenue
|
||||
Ricavo Marginale = Margini + Ricavo
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ 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. Vedrai anche come scaricare il grafico sul tuo computer o su Google Drive.
|
||||
Il prossimo video ti offrirà un'analisi più approfondita di quello che puoi fare con i grafici di sistemi di equazioni e disuguaglianze e con l'ombreggiatura sopra o sotto una curva. Vedrai anche come scaricare il grafico sul tuo computer o su Google Drive.
|
||||
|
||||
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>
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ Graficare un'equazione o due
|
||||
|
||||
---
|
||||
|
||||
Show tic marks on the graph
|
||||
Mostrare i segni di graduazione nel grafico
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d25c9078df117ce4c403
|
||||
title: "Parent Graphs and Polynomials: Extra"
|
||||
title: "Grafici Genitori e Polinomi: Extra"
|
||||
challengeType: 15
|
||||
videoId: YDlXmmRgQJI
|
||||
dashedName: parent-graphs-and-polynomials-extra
|
||||
@@ -8,7 +8,7 @@ dashedName: parent-graphs-and-polynomials-extra
|
||||
|
||||
# --description--
|
||||
|
||||
Questo video ti mostrerà come aggiungere cursori ai grafici, per vederli cambiare in tempo reale. You will also see ways to use loops to find the roots of a graph, and how this method is different from factoring.
|
||||
Questo video ti mostrerà come aggiungere cursori ai grafici, per vederli cambiare in tempo reale. Vedrai anche dei modi per usare i loop per trovare le radici di un grafico e come questo metodo è diverso dalla fattorizzazione.
|
||||
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1bspkmQVcKOXUuk-Orb0Mwl0GUGbqMpka?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per questo video.</a>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2529078df117ce4c402
|
||||
title: "Parent Graphs"
|
||||
title: "Grafici Genitori"
|
||||
challengeType: 15
|
||||
videoId: 6S2QhY8rIcw
|
||||
dashedName: parent-graphs
|
||||
@@ -8,7 +8,7 @@ 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.
|
||||
In questo video vedrai come appaiono i grafici genitori, come modificarli e come fare tutto ciò con il codice Python.
|
||||
|
||||
Ecco il <a href="https://colab.research.google.com/drive/1uwKuaHCC2WCUFKmXW-5NqWUlEP9ak7Pz?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">notebook Colab per questo video.</a>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5900f3b61000cf542c50fec8
|
||||
title: 'Problem 73: Counting fractions in a range'
|
||||
title: 'Problema 73: contare frazioni in un range'
|
||||
challengeType: 1
|
||||
forumTopicId: 302186
|
||||
dashedName: problem-73-counting-fractions-in-a-range
|
||||
@@ -8,43 +8,43 @@ dashedName: problem-73-counting-fractions-in-a-range
|
||||
|
||||
# --description--
|
||||
|
||||
Consider the fraction, $\frac{n}{d}$, where `n` and `d` are positive integers. If `n` < `d` and highest common factor, ${HCF}(n, d) = 1$, it is called a reduced proper fraction.
|
||||
Considera la frazione, $\frac{n}{d}$, dove `n` e `d` sono numeri interi positivi. Se `n` < `d` e il fattore comune più alto, ${HCF}(n, d) = 1$, viene chiamata frazione ridotta propria.
|
||||
|
||||
If we list the set of reduced proper fractions for `d` ≤ 8 in ascending order of size, we get:
|
||||
Se elenchiamo la lista delle frazioni proprie ridotte per `d` ≤ 8 in ordine decrescente di dimensioni, otteniamo:
|
||||
|
||||
$$\frac{1}{8}, \frac{1}{7}, \frac{1}{6}, \frac{1}{5}, \frac{1}{4}, \frac{2}{7}, \frac{1}{3}, \mathbf{\frac{3}{8}, \frac{2}{5}, \frac{3}{7}}, \frac{1}{2}, \frac{4}{7}, \frac{3}{5}, \frac{5}{8}, \frac{2}{3}, \frac{5}{7}, \frac{3}{4}, \frac{4}{5}, \frac{5}{6}, \frac{6}{7}, \frac{7}{8}$$
|
||||
|
||||
It can be seen that there are `3` fractions between $\frac{1}{3}$ and $\frac{1}{2}$.
|
||||
Si vede che ci sono `3` frazioni tra $\frac{1}{3}$ e $\frac{1}{2}$.
|
||||
|
||||
How many fractions lie between $\frac{1}{3}$ and $\frac{1}{2}$ in the sorted set of reduced proper fractions for `d` ≤ `limit`?
|
||||
Quante frazioni ci sono tra $\frac{1}{3}$ e $\frac{1}{2}$ nel set ordinato di frazioni proprie ridotte per `d` ≤ `limit`?
|
||||
|
||||
# --hints--
|
||||
|
||||
`countingFractionsInARange(8)` should return a number.
|
||||
`countingFractionsInARange(8)` dovrebbe restituire un numero.
|
||||
|
||||
```js
|
||||
assert(typeof countingFractionsInARange(8) === 'number');
|
||||
```
|
||||
|
||||
`countingFractionsInARange(8)` should return `3`.
|
||||
`countingFractionsInARange(8)` dovrebbe restituire `3`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingFractionsInARange(8), 3);
|
||||
```
|
||||
|
||||
`countingFractionsInARange(1000)` should return `50695`.
|
||||
`countingFractionsInARange(1000)` dovrebbe restituire `50695`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingFractionsInARange(1000), 50695);
|
||||
```
|
||||
|
||||
`countingFractionsInARange(6000)` should return `1823861`.
|
||||
`countingFractionsInARange(6000)` dovrebbe restituire `1823861`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingFractionsInARange(6000), 1823861);
|
||||
```
|
||||
|
||||
`countingFractionsInARange(12000)` should return `7295372`.
|
||||
`countingFractionsInARange(12000)` dovrebbe restituire `7295372`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingFractionsInARange(12000), 7295372);
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
一度に複数の条件をテストしなければならない場合があります。 <dfn>論理積</dfn>演算子 (`&&`) は、左側と右側の<dfn>オペランド</dfn>の両方が true である場合にのみ `true` を返します。
|
||||
|
||||
if ステートメントを別の if ステートメントにネストしても、同じ効果が得られます。
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
上の例は、`num` が `5` より大きく `10` より小さい場合にのみ `Yes` を返します。 同じロジックを次のように記述することができます。
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: comparisons-with-the-logical-or-operator
|
||||
|
||||
<dfn>論理和</dfn>演算子は 2 本のパイプ記号 (`||`) で構成されます。 この記号のキーは通常、バックスペースキーと Enter キーの間近くにあります。
|
||||
|
||||
次のようなパターンは以前のチャレンジでも登場しています。
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
上の例は、`num` が `5` と `10` の間 (5 と 10 を含む) の場合のみ、`Yes` を返します。 同じロジックを次のように記述することができます。
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
HTML の<dfn>属性 (attributes)</dfn> とは、要素の開始タグ内で使用され、要素の動作を制御する特別な単語です。 `img` 要素の `src` 属性は、画像の URL (画像がある場所) を指定します。 `src` 属性を使用している `img` 要素の例は `<img src="https://www.example.com/the-image.jpg">` のようになります。
|
||||
HTML の<dfn>属性 (attributes)</dfn> とは、要素の開始タグ内で使用され、要素の動作を制御する特別な単語です。 `img` 要素の `src` 属性は、画像の URL (画像がある場所) を指定します。
|
||||
|
||||
既存の `img` 要素に、`src` 属性を追加してこの URL を指定してください:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
コードには `img` 要素が 1 つ必要です。 `img` 要素を削除してしまったか、`src` 属性の値を引用符 (") で囲んでいない可能性があります。
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
`img` 要素には `src` 属性が必要です。 属性が設定されていないか、誤字脱字があります。 要素名と属性名の間には必ず半角スペースを入れてください。
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
`img` 要素の `src` 属性は '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`' に設定される必要があります。 URL が設定されていないか、誤字脱字があります。 URL の大文字小文字も関係があります。
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
`img` 要素の `src` は正しい URL に設定されていますが、属性の値は常に引用符 (") で囲むことが推奨されています。
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ assert.exists(new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type'))
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
Às vezes, você precisará testar mais de uma coisa de cada vez. O <dfn>operador lógico AND</dfn> (`&&`) retornará `true` apenas se os <dfn>operadores</dfn> à esquerda e à direita forem verdadeiros.
|
||||
|
||||
O mesmo efeito pode ser alcançado aninhando uma instrução if dentro de outro if:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
só retornará `Yes` se `num` for maior que `5` e menor que `10`. A mesma lógica pode ser escrita assim:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ O <dfn>operador lógico OR</dfn> (`||`) retorna `true` se qualquer um dos <dfn>o
|
||||
|
||||
O <dfn>operador lógico ou</dfn> é composto por dois símbolos de pipe: (`||`). Normalmente, ele pode ser encontrado entre as teclas Backspace e Enter.
|
||||
|
||||
O padrão abaixo deve parecer familiar aos pontos das passagens anteriores:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
retornará `Yes` apenas se `num` for entre `5` e `10` (5 e 10 incluídos). A mesma lógica pode ser escrita assim:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
<dfn>Atributos</dfn> em HTML são palavras especiais usadas dentro da tag de abertura de um elemento para controlar o comportamento dele. O atributo `src` em um elemento `img` especifica o URL da imagem (onde a imagem está localizada). Um exemplo de um elemento `img` usando o atributo `src` é: `<img src="https://www.example.com/the-image.jpg">`.
|
||||
<dfn>Atributos</dfn> em HTML são palavras especiais usadas dentro da tag de abertura de um elemento para controlar o comportamento dele. O atributo `src` em um elemento `img` especifica o URL da imagem (onde a imagem está localizada).
|
||||
|
||||
Dentro do elemento existente `img`, adicione um atributo `src` com este URL:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
O código deve ter um elemento `img`. Você pode ter removido o elemento `img` ou não cercou o valor do atributo `src` com aspas.
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
O elemento `img` deve ter um atributo `src`. Você omitiu o atributo ou tem um erro de digitação. Certifique-se de que haja um espaço entre o nome do elemento e o nome do atributo.
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
O atributo `src` do elemento `img` deve estar definido como '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. Você omitiu o URL ou tem um erro de digitação. As verificações distinguem maiúsculas e minúsculas no URL.
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
Embora você tenha definido o `src` do elemento `img` com o URL correto, é recomendável sempre cercar o valor de um atributo com aspas.
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ assert.exists(new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type'))
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -11,7 +11,7 @@ dashedName: comparisons-with-the-logical-and-operator
|
||||
|
||||
Іноді потрібно перевірити декілька речей одночасно. <dfn>Логічний оператор and</dfn> (`&&`) повертає `true` лише за умови, що <dfn>операнди</dfn> зліва та справа істинні.
|
||||
|
||||
Такого ж результату можна досягнути, вклавши одну інструкцію if в іншу:
|
||||
The same effect could be achieved by nesting an `if` statement inside another `if`.
|
||||
|
||||
```js
|
||||
if (num > 5) {
|
||||
@@ -22,7 +22,7 @@ if (num > 5) {
|
||||
return "No";
|
||||
```
|
||||
|
||||
поверне `Yes`, якщо `num` більше ніж `5` та менше ніж `10`. Цю саму логіку можна записати як:
|
||||
This code will return `Yes` if `num` is greater than `5` and less than `10`. The same logic can be written with the <dfn>logical and</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 5 && num < 10) {
|
||||
|
||||
@@ -13,7 +13,7 @@ dashedName: comparisons-with-the-logical-or-operator
|
||||
|
||||
<dfn>Логічний оператор or</dfn> складається з двох вертикальних рисок: (`||`). Як правило, цей символ можна знайти на клавіатурі між клавішами backspace та enter.
|
||||
|
||||
Наведений нижче шаблон має виглядати знайомим за пунктами з попередніх уривків:
|
||||
The pattern below should look familiar from prior waypoints.
|
||||
|
||||
```js
|
||||
if (num > 10) {
|
||||
@@ -25,7 +25,7 @@ if (num < 5) {
|
||||
return "Yes";
|
||||
```
|
||||
|
||||
поверне `Yes` лише за умови, що `num` знаходиться між `5` та `10` (включно з 5 і 10). Цю саму логіку можна записати як:
|
||||
This code will return `Yes` if `num` is between `5` and `10` (`5` and `10` included). The same logic can be written with the <dfn>logical or</dfn> operator.
|
||||
|
||||
```js
|
||||
if (num > 10 || num < 5) {
|
||||
|
||||
@@ -7,33 +7,39 @@ dashedName: step-8
|
||||
|
||||
# --description--
|
||||
|
||||
HTML <dfn>атрибути</dfn> – це спеціальні слова, які використовують всередині початкового теґа елемента для керування поведінкою елемента. Атрибут `src` в елементі `img` зазначає URL-адресу зображення (де локалізовано зображення). Приклад використання елементом `img` атрибута `src`: `<img src="https://www.example.com/the-image.jpg">`.
|
||||
HTML <dfn>атрибути</dfn> – це спеціальні слова, які використовують всередині початкового теґа елемента для керування поведінкою елемента. Атрибут `src` в елементі `img` зазначає URL-адресу зображення (де локалізовано зображення).
|
||||
|
||||
Всередині наявного елемента `img` додайте атрибут `src` з такою URL-адресою:
|
||||
Here is an example of an `img` element with a `src` attribute pointing to the freeCodeCamp logo:
|
||||
|
||||
```html
|
||||
<img src="https://cdn.freecodecamp.org/platform/universal/fcc_secondary.svg">
|
||||
```
|
||||
|
||||
Inside the existing `img` element, add an `src` attribute with this URL:
|
||||
|
||||
`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`
|
||||
|
||||
# --hints--
|
||||
|
||||
Ваш код повинен мати елемент `img`. Можливо, ви видалили елемент `img` або ви не оточили значення атрибута `src` в лапки.
|
||||
Your code should have an `img` element. You may have removed the `img` element or you have not surrounded the `src` attribute's value with quotes.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img'));
|
||||
```
|
||||
|
||||
Елемент `img` повинен мати атрибут `src`. Ви або не додали атрибут, або маєте друкарську помилку. Переконайтеся, що між назвою елемента та назвою атрибуту є пробіл.
|
||||
Your `img` element should have an `src` attribute. You have either omitted the attribute or have a typo. Make sure there is a space between the element name and the attribute name.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src);
|
||||
```
|
||||
|
||||
Атрибут `src` вашого елемента `img` повинен мати значення '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. Ви або не написали URL-адресу, або маєте друкарську помилку. Важливо, з якої літери написана URL-адреса (з великої чи малої).
|
||||
Your `img` element's `src` attribute should be set to '`https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg`'. You have either omitted the URL or have a typo. The case of the URL is important.
|
||||
|
||||
```js
|
||||
assert(document.querySelector('img').src === 'https://cdn.freecodecamp.org/curriculum/cat-photo-app/relaxing-cat.jpg');
|
||||
```
|
||||
|
||||
Хоча ви встановили атрибут `src` елемента `img` як правильну URL-адресу, краще завжди писати значення атрибута в лапках.
|
||||
Although you have set the `img` element's `src` to the correct URL, it is recommended to always surround the value of an attribute with quotation marks.
|
||||
|
||||
```js
|
||||
assert(!/\<img\s+src\s*=\s*https:\/\/cdn\.freecodecamp\.org\/curriculum\/cat-photo-app\/relaxing-cat\.jpg/.test(code));
|
||||
|
||||
@@ -27,7 +27,7 @@ assert.exists(new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type'))
|
||||
|
||||
```js
|
||||
const borderBottom = new __helpers.CSSHelp(document).getStyle('fieldset:last-of-type')?.borderBottom;
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none');
|
||||
assert(borderBottom === 'none' || borderBottom === 'medium none' || borderBottom === 'medium');
|
||||
```
|
||||
|
||||
# --seed--
|
||||
|
||||
@@ -7,11 +7,11 @@ dashedName: step-1
|
||||
|
||||
# --description--
|
||||
|
||||
Statistics is a way of using math to make sense of data. It helps us understand patterns and trends in information, so we can make predictions and decisions based on that information.
|
||||
Статистика — це спосіб використання математики, щоб зрозуміти дані. Завдяки їй легко зрозуміти закономірності та тенденції інформації, щоб зробити прогнози та прийняти рішення на її основі.
|
||||
|
||||
In this challenge, you will build a statistics calculator that takes a set of numbers and returns the mean, median, mode, standard deviation, and variance.
|
||||
У цьому завданні ви створите статистичний калькулятор, який приймає набір чисел та повертає середнє число, хвильове число, середнє квадратичне відхилення та дисперсію.
|
||||
|
||||
The HTML and CSS have been provided for you. Feel free to explore the code – you may notice that the `calculate` function is called when the form is submitted. When you are ready, declare a `calculate` variable and assign it an empty function in the `script.js` file.
|
||||
Вам вже надано HTML та CSS. Розгляньте код: ви можете помітити, що функція `calculate` викликається тоді, коли надіслана форма. Коли будете готові, оголосіть змінну `calculate` та призначте їй порожню функцію у файлі `script.js`.
|
||||
|
||||
# --hints--
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ dashedName: step-2
|
||||
|
||||
# --description--
|
||||
|
||||
To begin, the `calculate` function needs to find the number that was entered in the `#numbers` input field. To do this, use a `.querySelector` to locate the input field and then use the `.value` property to get the number entered.
|
||||
Для початку, функція `calculate` повинна знаходити число, введене у полі введення `#numbers`. Для цього використайте `.querySelector`, щоб визначити розташування поля, а потім використайте властивість `.value`, щоб отримати введене число.
|
||||
|
||||
Store this in a `value` variable.
|
||||
Збережіть це у змінній `value`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -19,19 +19,19 @@ Store this in a `value` variable.
|
||||
assert.match(calculate.toString(), /value/);
|
||||
```
|
||||
|
||||
Your `calculate` function should call `document.querySelector()` with `#numbers` as the argument.
|
||||
Функція `calculate` повинна викликати `document.querySelector()` із `#numbers` як аргумент.
|
||||
|
||||
```js
|
||||
assert.match(calculate.toString(), /document\.querySelector\(\s*("|')#numbers\1\s*\)/)
|
||||
```
|
||||
|
||||
You should access the `value` property of your `document.querySelector()` call.
|
||||
Ви повинні отримати доступ до властивості `value` виклику `document.querySelector()`.
|
||||
|
||||
```js
|
||||
assert.match(calculate.toString(), /document\.querySelector\(\s*("|')#numbers\1\s*\)\.value/);
|
||||
```
|
||||
|
||||
You should assign the `value` property to your `value` variable.
|
||||
Ви повинні призначити властивість `value` до змінної `value`.
|
||||
|
||||
```js
|
||||
assert.match(calculate.toString(), /value\s*=\s*document\.querySelector\(\s*("|')#numbers\1\s*\)\.value/);
|
||||
|
||||
@@ -7,11 +7,11 @@ dashedName: step-3
|
||||
|
||||
# --description--
|
||||
|
||||
Now that you have the value of the input, you need to split it into an array of numbers. Use the `.split()` method to do this.
|
||||
Тепер ви маєте введене значення, яке потрібно розділити на масив чисел. Для цього використайте метод `.split()`.
|
||||
|
||||
The `.split()` method takes a string and splits it into an array of strings. You can pass it a string of characters or a RegEx to use as a separator. For example, `string.split(",")` would split the string at each comma and return an array of strings.
|
||||
Метод `.split()` приймає рядок та розділяє його на масив рядків. Ви можете передати йому рядок символів або RegEx у ролі роздільника. Наприклад, `string.split(",")` розділить рядок на місці коми та поверне масив рядків.
|
||||
|
||||
Use a regex to split the `value` string by commas followed by any number of spaces. Store the array in an `array` variable.
|
||||
Використайте регулярний вираз, щоб розділити рядок `value` комами з будь-якою кількістю пробілів. Збережіть масив у змінній `array`.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -21,13 +21,13 @@ Use a regex to split the `value` string by commas followed by any number of spac
|
||||
assert.match(code.toString(), /array/);
|
||||
```
|
||||
|
||||
Your `calculate` function should call the `.split()` method on the `value` variable.
|
||||
Функція `calculate` повинна викликати метод `.split()` на змінній `value`.
|
||||
|
||||
```js
|
||||
assert.match(code.toString(), /value\.split()/);
|
||||
```
|
||||
|
||||
Функція `calculate` повинна присвоїти результат методу `.split()` до змінної `array`.
|
||||
Функція `calculate` повинна призначити результат методу `.split()` до змінної `array`.
|
||||
|
||||
```js
|
||||
assert.match(code.toString(), /array\s*=\s*value\.split()/);
|
||||
|
||||
@@ -7,9 +7,9 @@ dashedName: step-4
|
||||
|
||||
# --description--
|
||||
|
||||
The value of an input element is always a string, even if the input type is `number`. You need to convert this array of strings into an array of numbers. To do this, you can use the `.map()` method.
|
||||
Значенням вхідного елемента завжди є рядок, навіть якщо типом є `number`. Вам потрібно перетворити цей масив рядків у масив чисел. Для цього можна використати метод `.map()`.
|
||||
|
||||
Create a `numbers` variable and assign it the value of `array.map()`. Remember that `.map()` creates a new array, instead of mutating the original array.
|
||||
Створіть змінну `numbers` та призначте їй значення `array.map()`. Пам’ятайте, що `.map()` створює новий масив, а не змінює початковий.
|
||||
|
||||
# --hints--
|
||||
|
||||
@@ -19,13 +19,13 @@ Create a `numbers` variable and assign it the value of `array.map()`. Remember t
|
||||
assert.match(calculate.toString(), /numbers/);
|
||||
```
|
||||
|
||||
You should use the `.map()` method on your `array` variable.
|
||||
Ви повинні використати метод `.map()` на змінній `array`.
|
||||
|
||||
```js
|
||||
assert.match(calculate.toString(), /array\.map\(\)/);
|
||||
```
|
||||
|
||||
Ви повинні присвоїти результат виклику `.map()` до змінної `numbers`.
|
||||
Ви повинні призначити результат виклику `.map()` до змінної `numbers`.
|
||||
|
||||
```js
|
||||
assert.match(calculate.toString(), /numbers\s*=\s*array.map()/);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63d8401e39c73468b059cd42
|
||||
title: "Build a Financial Calculator"
|
||||
title: "Створіть фінансовий калькулятор"
|
||||
challengeType: 10
|
||||
dashedName: build-a-financial-calculator
|
||||
---
|
||||
@@ -15,12 +15,12 @@ dashedName: build-a-financial-calculator
|
||||
|
||||
У цьому завданні за допомогою Python потрібно створити багатофункціональний калькулятор, який приймає вхідні дані та виконує наступне:
|
||||
|
||||
- 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
|
||||
- розраховує ануїтет за місячним або постійним зростанням
|
||||
- розраховує щомісячну іпотечну оплату
|
||||
- розраховує пенсійні нарахування
|
||||
- визначає, скільки часу потрібно, щоб сума подвоїлася, враховуючи ставку
|
||||
- розв’язує логарифмічні рівняння
|
||||
- виконує перетворення експоненційного запису
|
||||
|
||||
Якщо вам потрібна допомога, ви можете переглядати <a href="https://www.youtube.com/embed/c2AhGd6srJ0" target="_blank" rel="noopener noreferrer nofollow">відео протягом виконання проєкту.</a>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2959078df117ce4c408
|
||||
title: "More Resources in Colab"
|
||||
title: "Більше ресурсів у Colab"
|
||||
challengeType: 15
|
||||
videoId: HNFrRHqpck4
|
||||
dashedName: more-resources-in-colab
|
||||
@@ -8,25 +8,25 @@ 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.
|
||||
Ще одне... Це коротке відео повідомить про деякі ресурси, доступні у блокнотах Google Colab.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which code snippets are available in the Google Colaboratory?
|
||||
Які фрагменти коду доступні у Google Colaboratory?
|
||||
|
||||
## --answers--
|
||||
|
||||
Camera capture
|
||||
Захоплення камери
|
||||
|
||||
---
|
||||
|
||||
Adding form fields
|
||||
Додавання поля форми
|
||||
|
||||
---
|
||||
|
||||
Importing data from Google Sheets
|
||||
Імпорт даних з гугл-таблиць
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d2899078df117ce4c407
|
||||
title: "Spreadsheets and Additional Resources"
|
||||
title: "Електронні таблиці та додаткові ресурси"
|
||||
challengeType: 15
|
||||
videoId: JH9Uk2mi3Dc
|
||||
dashedName: spreadsheets-and-additional-resources
|
||||
@@ -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.
|
||||
Розглянемо, як ви можете поєднати свої знання з математики та Python із зовнішніми даними. Це відео покаже, як можна отримати дані з інших джерел, а потім перетворити ці дані так, щоб побудувати графік та інтерпретувати його.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What library helps you to read data from a .csv and store it as a dataframe where you can select columns?
|
||||
Яка бібліотека допомагає читати дані з файлів .csv та зберігати їх як dataframe, де можна вибрати стовпці?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d2a9b51aeedd1a2bd654
|
||||
title: "Solving Systems of Equations: Extra"
|
||||
title: "Розв’язок систем рівнянь: додатково"
|
||||
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.
|
||||
У цьому відео показано один зі способів створення калькулятора, який виконує розв’язок та будує графік. Ви також побачите, як зменшити/збільшити масштаб графіку та як написати код для цієї функціональності.
|
||||
|
||||
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.
|
||||
Ось <a href="https://colab.research.google.com/drive/1a_RtRtVfeO0m2528T4V-bCXozWf3HpM7?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a> Це приклад того, яким повинен бути ваш блокнот наразі, оскільки у вас вже є декілька функцій та ви створили пару заголовків.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following is not true?
|
||||
Яке з тверджень неправильне?
|
||||
|
||||
## --answers--
|
||||
|
||||
When graphing, you can adjust your tic marks on each axis
|
||||
При побудові графіку ви можете корегувати свої позначки на кожній осі
|
||||
|
||||
---
|
||||
|
||||
The `nonlinsolve()` function can solve linear equations
|
||||
Функція `nonlinsolve()` може розв’язувати лінійні рівняння
|
||||
|
||||
---
|
||||
|
||||
The `linsolve()` function can solve nonlinear equations
|
||||
Функція `linsolve()` може розв’язувати нелінійні рівняння
|
||||
|
||||
---
|
||||
|
||||
To zoom in or out on a graph, an interactive slider is useful
|
||||
Інтерактивний повзунок корисний, щоб зменшити/збільшити масштаб графіка
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d2b0b51aeedd1a2bd655
|
||||
title: "Solving Systems"
|
||||
title: "Розв’язок систем рівнянь"
|
||||
challengeType: 15
|
||||
videoId: CNGUQzXfC6c
|
||||
dashedName: solving-systems
|
||||
@@ -8,35 +8,35 @@ dashedName: solving-systems
|
||||
|
||||
# --description--
|
||||
|
||||
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>
|
||||
Ось <a href="https://colab.research.google.com/drive/1UfyQiXCedAAv5kcqgi_pGYV-HkSgN8YD?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add code to your notebook to solve and graph systems of equations
|
||||
Додайте код для розв’язку та побудови графіка систем рівнянь до свого блокнота.
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following can SymPy do that matplotlib can't do?
|
||||
Що з переліченого може виконати SymPy, але не може виконати matplotlib?
|
||||
|
||||
## --answers--
|
||||
|
||||
Solve for a variable
|
||||
Знайти значення змінної
|
||||
|
||||
---
|
||||
|
||||
Display an x-y axis
|
||||
Показати вісь x-y
|
||||
|
||||
---
|
||||
|
||||
Graph an equation or two
|
||||
Побудувати графік одного чи двох рівнянь
|
||||
|
||||
---
|
||||
|
||||
Show tic marks on the graph
|
||||
Показати позначки на графіку
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d28ab51aeedd1a2bd650
|
||||
title: "Linear Equations"
|
||||
title: "Лінійні рівняння"
|
||||
challengeType: 15
|
||||
videoId: u0bgovPh4ME
|
||||
dashedName: linear-equations
|
||||
@@ -8,19 +8,19 @@ dashedName: linear-equations
|
||||
|
||||
# --description--
|
||||
|
||||
This video will show you the math behind finding the y-intercept in a linear function, so you can develop the whole equation. Then the video will show you how to graph the whole function. You will also see how to do the whole process with Python code.
|
||||
Це відео покаже, що лежить в основі пошуку точки перетину з віссю y, щоб ви могли записати повне рівняння. Потім ви побачите, як побудувати графік повної функції. Ви також побачите, як це все працює з кодом Python.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UJ1w-XFTuCfK6FI3H2GT0lbxd2HO3tQ6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook to go with the last two videos,</a> so you can see the formulas.
|
||||
Ось <a href="https://colab.research.google.com/drive/1UJ1w-XFTuCfK6FI3H2GT0lbxd2HO3tQ6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для двох останніх відео,</a> що ви могли бачити формули.
|
||||
|
||||
# --question--
|
||||
|
||||
## --assignment--
|
||||
|
||||
Add code to your algebra Colab notebook to graph a function from points or from equation input.
|
||||
Додайте код для побудови графіків функції з точок чи вхідних рівнянь до свого блокнота Colab.
|
||||
|
||||
## --text--
|
||||
|
||||
If you know the slope ("m") and you have one (x,y) coordinate point, which of the following equations could you use to find "b", representing the y-intercept in Python?
|
||||
Ви знаєте кутовий коефіцієнт (m) та маєте одну координатну точку (x, y). Яке з перелічених рівнянь ви б використали для пошуку b, що представляє перетин з віссю y в Python?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d283b51aeedd1a2bd64f
|
||||
title: "Linear Functions: Extra"
|
||||
title: "Лінійні функції: додатково"
|
||||
challengeType: 15
|
||||
videoId: Emeex5gi5uA
|
||||
dashedName: linear-functions-extra
|
||||
@@ -8,15 +8,15 @@ dashedName: linear-functions-extra
|
||||
|
||||
# --description--
|
||||
|
||||
This video will give you a deeper look into developing equations from word problems (so then you can write the code to solve or graph those equations). The video will also begin to look at data points as (x,y) coordinates. With this, you will begin to see the connection between Algebra and data science.
|
||||
У цьому відео детальніше розглядається те, як створити рівняння для текстових задач (щоб потім ви могли написати код для розв’язку рівнянь чи побудови графіку). Ви також розглянете експериментальні точки, а саме координати (x, y). Завдяки цьому ви помітите зв’язок між алгеброю та наукою про дані.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1OzC7gqCNWNzwv50ziNeG2IJhbXm88-XK?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this video.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1OzC7gqCNWNzwv50ziNeG2IJhbXm88-XK?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
Which of the following would you not use when displaying a graph?
|
||||
Що з переліченого ви б не використали при показі графіка?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6331d291b51aeedd1a2bd651
|
||||
title: "Slope"
|
||||
title: "Кутовий коефіцієнт"
|
||||
challengeType: 15
|
||||
videoId: nURsz7SR5aM
|
||||
dashedName: slope
|
||||
@@ -8,15 +8,15 @@ dashedName: slope
|
||||
|
||||
# --description--
|
||||
|
||||
This first video will focus on the slope of a line and how to calculate it.
|
||||
Перше відео фокусуватиметься на кутовому коефіцієнті прямої та його розрахунку.
|
||||
|
||||
Here is the <a href="https://colab.research.google.com/drive/1UJ1w-XFTuCfK6FI3H2GT0lbxd2HO3tQ6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">Colab notebook used in this and the next videos.</a>
|
||||
Ось <a href="https://colab.research.google.com/drive/1UJ1w-XFTuCfK6FI3H2GT0lbxd2HO3tQ6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього та наступних відео.</a>
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
If you have already defined these variables, which of the following is the correct slope formula?
|
||||
Якщо ви вже визначили ці змінні, що з переліченого є правильною формулою кутового коефіцієнта?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 63dbd1335d93712ff177d96a
|
||||
title: "Simple and Compound Interest: Extra"
|
||||
title: "Прості та складні відсотки: додатково"
|
||||
challengeType: 15
|
||||
videoId: 2cbrstoKNSc
|
||||
dashedName: simple-and-compound-interest-extra
|
||||
@@ -8,13 +8,13 @@ dashedName: simple-and-compound-interest-extra
|
||||
|
||||
# --description--
|
||||
|
||||
Here is a detour from the Python code, as this video shows you how to create mortgage payment amortization tables in Google Sheets. You will also learn about how to use a very similar setup to estimate retirement account investment returns. This is the video that shows you where your money is going.
|
||||
Зараз ви обійдете Python іншою дорогою, оскільки це відео покаже, як створити таблиці амортизації платежів у гугл-таблицях. Ви також дізнаєтесь, як використовувати схоже налаштування, щоб визначити пенсійні нарахування. Простими словами: у відео показують, куди йдуть ваші гроші.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
What marker do you use to attach a formula to a cell in a spreadsheet?
|
||||
Що використовують для того, щоб додати формулу до клітинки в електронній таблиці?
|
||||
|
||||
## --answers--
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 6363d26c9078df117ce4c405
|
||||
title: "Simple and Compound Interest"
|
||||
title: "Прості та складні відсотки"
|
||||
challengeType: 15
|
||||
videoId: iMPFK7wXNPg
|
||||
dashedName: simple-and-compound-interest
|
||||
@@ -8,33 +8,33 @@ dashedName: simple-and-compound-interest
|
||||
|
||||
# --description--
|
||||
|
||||
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>
|
||||
Ось <a href="https://colab.research.google.com/drive/1IVBaeX84arJXS73raRROaxbz4qMyFVb6?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab для цього відео.</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.
|
||||
Ось додатковий <a href="https://colab.research.google.com/drive/1-HWYmzKn6HmEUWMBv7G525CpoQpm8TnN?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">блокнот Colab, який показує один зі способів додавання відсотків та формул розрахунку до функцій Python.</a> Ви також побачите приклад використання деяких формул для відображення результатів, спостереження за трендами та дотримання інших формул, щоб аналізувати закономірності.
|
||||
|
||||
# --question--
|
||||
|
||||
## --text--
|
||||
|
||||
In percent increase formulas, what does the "principle" refer to?
|
||||
Що означає «принцип» у формулах відсоткового збільшення?
|
||||
|
||||
## --answers--
|
||||
|
||||
the main amount
|
||||
основна сума
|
||||
|
||||
---
|
||||
|
||||
the ending amount
|
||||
кінцева сума
|
||||
|
||||
---
|
||||
|
||||
the starting amount
|
||||
початкова сума
|
||||
|
||||
---
|
||||
|
||||
the (1 + rate) multiplier
|
||||
множник (1 + ставка)
|
||||
|
||||
## --video-solution--
|
||||
|
||||
|
||||
@@ -14,31 +14,31 @@ Find the sum of all the multiples of 3 or 5 below the provided parameter value `
|
||||
|
||||
# --hints--
|
||||
|
||||
`multiplesOf3and5(10)` should return a number.
|
||||
`multiplesOf3and5(10)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof multiplesOf3and5(10) === 'number');
|
||||
```
|
||||
|
||||
`multiplesOf3and5(49)` should return 543.
|
||||
`multiplesOf3and5(49)` має повернути 543.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(49), 543);
|
||||
```
|
||||
|
||||
`multiplesOf3and5(1000)` should return 233168.
|
||||
`multiplesOf3and5(1000)` має повернути 233168.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(1000), 233168);
|
||||
```
|
||||
|
||||
`multiplesOf3and5(8456)` should return 16687353.
|
||||
`multiplesOf3and5(8456)` має повернути 16687353.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(8456), 16687353);
|
||||
```
|
||||
|
||||
`multiplesOf3and5(19564)` should return 89301183.
|
||||
`multiplesOf3and5(19564)` має повернути 89301183.
|
||||
|
||||
```js
|
||||
assert.strictEqual(multiplesOf3and5(19564), 89301183);
|
||||
|
||||
@@ -14,31 +14,31 @@ Find the sum of all the primes below `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`primeSummation(17)` should return a number.
|
||||
`primeSummation(17)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof primeSummation(17) === 'number');
|
||||
```
|
||||
|
||||
`primeSummation(17)` should return 41.
|
||||
`primeSummation(17)` має повернути 41.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(17), 41);
|
||||
```
|
||||
|
||||
`primeSummation(2001)` should return 277050.
|
||||
`primeSummation(2001)` має повернути 277050.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(2001), 277050);
|
||||
```
|
||||
|
||||
`primeSummation(140759)` should return 873608362.
|
||||
`primeSummation(140759)` має повернути 873608362.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(140759), 873608362);
|
||||
```
|
||||
|
||||
`primeSummation(2000000)` should return 142913828922.
|
||||
`primeSummation(2000000)` має повернути 142913828922.
|
||||
|
||||
```js
|
||||
assert.strictEqual(primeSummation(2000000), 142913828922);
|
||||
|
||||
@@ -18,37 +18,37 @@ By finding the first arrangement to contain over `limit` discs in total, determi
|
||||
|
||||
# --hints--
|
||||
|
||||
`arrangedProbability(20)` should return a number.
|
||||
`arrangedProbability(20)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof arrangedProbability(10) === 'number');
|
||||
```
|
||||
|
||||
`arrangedProbability(20)` should return `15`.
|
||||
`arrangedProbability(20)` має повернути `15`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(arrangedProbability(20), 15);
|
||||
```
|
||||
|
||||
`arrangedProbability(100)` should return `85`.
|
||||
`arrangedProbability(100)` має повернути `85`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(arrangedProbability(100), 85);
|
||||
```
|
||||
|
||||
`arrangedProbability(100000)` should return `97513`.
|
||||
`arrangedProbability(100000)` має повернути `97513`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(arrangedProbability(100000), 97513);
|
||||
```
|
||||
|
||||
`arrangedProbability(1000000000)` should return `3822685023`.
|
||||
`arrangedProbability(1000000000)` має повернути `3822685023`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(arrangedProbability(1000000000), 3822685023);
|
||||
```
|
||||
|
||||
`arrangedProbability(1000000000000)` should return `756872327473`.
|
||||
`arrangedProbability(1000000000000)` має повернути `756872327473`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(arrangedProbability(1000000000000), 756872327473);
|
||||
|
||||
@@ -39,19 +39,19 @@ What is the greatest product of four adjacent numbers in the same direction (up,
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestGridProduct(testGrid)` should return a number.
|
||||
`largestGridProduct(testGrid)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof largestGridProduct(testGrid) === 'number');
|
||||
```
|
||||
|
||||
`largestGridProduct(testGrid)` should return 14169081.
|
||||
`largestGridProduct(testGrid)` має повернути 14169081.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestGridProduct(testGrid), 14169081);
|
||||
```
|
||||
|
||||
`largestGridProduct(grid)` should return 70600674.
|
||||
`largestGridProduct(grid)` має повернути 70600674.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestGridProduct(grid), 70600674);
|
||||
|
||||
@@ -28,37 +28,37 @@ What is the value of the first triangle number to have over `n` divisors?
|
||||
|
||||
# --hints--
|
||||
|
||||
`divisibleTriangleNumber(5)` should return a number.
|
||||
`divisibleTriangleNumber(5)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof divisibleTriangleNumber(5) === 'number');
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(5)` should return 28.
|
||||
`divisibleTriangleNumber(5)` має повернути 28.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(5), 28);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(23)` should return 630.
|
||||
`divisibleTriangleNumber(23)` має повернути 630.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(23), 630);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(167)` should return 1385280.
|
||||
`divisibleTriangleNumber(167)` має повернути 1385280.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(167), 1385280);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(374)` should return 17907120.
|
||||
`divisibleTriangleNumber(374)` має повернути 17907120.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(374), 17907120);
|
||||
```
|
||||
|
||||
`divisibleTriangleNumber(500)` should return 76576500.
|
||||
`divisibleTriangleNumber(500)` має повернути 76576500.
|
||||
|
||||
```js
|
||||
assert.strictEqual(divisibleTriangleNumber(500), 76576500);
|
||||
|
||||
@@ -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)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof largeSum(testNums) === 'number');
|
||||
```
|
||||
|
||||
`largeSum(testNums)` should return 8348422521.
|
||||
`largeSum(testNums)` має повернути 8348422521.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largeSum(testNums), 8348422521);
|
||||
```
|
||||
|
||||
`largeSum(fiftyDigitNums)` should return 5537376230.
|
||||
`largeSum(fiftyDigitNums)` має повернути 5537376230.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largeSum(fiftyDigitNums), 5537376230);
|
||||
|
||||
@@ -26,43 +26,43 @@ Which starting number, under the given `limit`, produces the longest chain?
|
||||
|
||||
# --hints--
|
||||
|
||||
`longestCollatzSequence(14)` should return a number.
|
||||
`longestCollatzSequence(14)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof longestCollatzSequence(14) === 'number');
|
||||
```
|
||||
|
||||
`longestCollatzSequence(14)` should return 9.
|
||||
`longestCollatzSequence(14)` має повернути 9.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(14), 9);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(5847)` should return 3711.
|
||||
`longestCollatzSequence(5847)` має повернути 3711.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(5847), 3711);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(46500)` should return 35655.
|
||||
`longestCollatzSequence(46500)` має повернути 35655.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(46500), 35655);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(54512)` should return 52527.
|
||||
`longestCollatzSequence(54512)` має повернути 52527.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(54512), 52527);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(100000)` should return 77031.
|
||||
`longestCollatzSequence(100000)` має повернути 77031.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(100000), 77031);
|
||||
```
|
||||
|
||||
`longestCollatzSequence(1000000)` should return 837799.
|
||||
`longestCollatzSequence(1000000)` має повернути 837799.
|
||||
|
||||
```js
|
||||
assert.strictEqual(longestCollatzSequence(1000000), 837799);
|
||||
|
||||
@@ -16,25 +16,25 @@ How many such routes are there through a given `gridSize`?
|
||||
|
||||
# --hints--
|
||||
|
||||
`latticePaths(4)` should return a number.
|
||||
`latticePaths(4)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof latticePaths(4) === 'number');
|
||||
```
|
||||
|
||||
`latticePaths(4)` should return 70.
|
||||
`latticePaths(4)` має повернути 70.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(4), 70);
|
||||
```
|
||||
|
||||
`latticePaths(9)` should return 48620.
|
||||
`latticePaths(9)` має повернути 48620.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(9), 48620);
|
||||
```
|
||||
|
||||
`latticePaths(20)` should return 137846528820.
|
||||
`latticePaths(20)` має повернути 137846528820.
|
||||
|
||||
```js
|
||||
assert.strictEqual(latticePaths(20), 137846528820);
|
||||
|
||||
@@ -14,25 +14,25 @@ What is the sum of the digits of the number 2<sup><code>exponent</code></sup>?
|
||||
|
||||
# --hints--
|
||||
|
||||
`powerDigitSum(15)` should return a number.
|
||||
`powerDigitSum(15)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof powerDigitSum(15) === 'number');
|
||||
```
|
||||
|
||||
`powerDigitSum(15)` should return 26.
|
||||
`powerDigitSum(15)` має повернути 26.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(15), 26);
|
||||
```
|
||||
|
||||
`powerDigitSum(128)` should return 166.
|
||||
`powerDigitSum(128)` має повернути 166.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(128), 166);
|
||||
```
|
||||
|
||||
`powerDigitSum(1000)` should return 1366.
|
||||
`powerDigitSum(1000)` має повернути 1366.
|
||||
|
||||
```js
|
||||
assert.strictEqual(powerDigitSum(1000), 1366);
|
||||
|
||||
@@ -16,25 +16,25 @@ If all the numbers from 1 to given `limit` inclusive were written out in words,
|
||||
|
||||
# --hints--
|
||||
|
||||
`numberLetterCounts(5)` should return a number.
|
||||
`numberLetterCounts(5)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof numberLetterCounts(5) === 'number');
|
||||
```
|
||||
|
||||
`numberLetterCounts(5)` should return 19.
|
||||
`numberLetterCounts(5)` має повернути 19.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(5), 19);
|
||||
```
|
||||
|
||||
`numberLetterCounts(150)` should return 1903.
|
||||
`numberLetterCounts(150)` має повернути 1903.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(150), 1903);
|
||||
```
|
||||
|
||||
`numberLetterCounts(1000)` should return 21124.
|
||||
`numberLetterCounts(1000)` має повернути 21124.
|
||||
|
||||
```js
|
||||
assert.strictEqual(numberLetterCounts(1000), 21124);
|
||||
|
||||
@@ -41,19 +41,19 @@ Find the maximum total from top to bottom of the triangle below:
|
||||
|
||||
# --hints--
|
||||
|
||||
`maximumPathSumI(testTriangle)` should return a number.
|
||||
`maximumPathSumI(testTriangle)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof maximumPathSumI(testTriangle) === 'number');
|
||||
```
|
||||
|
||||
`maximumPathSumI(testTriangle)` should return 23.
|
||||
`maximumPathSumI(testTriangle)` має повернути 23.
|
||||
|
||||
```js
|
||||
assert.strictEqual(maximumPathSumI(testTriangle), 23);
|
||||
```
|
||||
|
||||
`maximumPathSumI(numTriangle)` should return 1074.
|
||||
`maximumPathSumI(numTriangle)` має повернути 1074.
|
||||
|
||||
```js
|
||||
assert.strictEqual(maximumPathSumI(numTriangle), 1074);
|
||||
|
||||
@@ -20,25 +20,25 @@ How many Sundays fell on the first of the month during the twentieth century (1
|
||||
|
||||
# --hints--
|
||||
|
||||
`countingSundays(1943, 1946)` should return a number.
|
||||
`countingSundays(1943, 1946)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof countingSundays(1943, 1946) === 'number');
|
||||
```
|
||||
|
||||
`countingSundays(1943, 1946)` should return 6.
|
||||
`countingSundays(1943, 1946)` має повернути 6.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1943, 1946), 6);
|
||||
```
|
||||
|
||||
`countingSundays(1995, 2000)` should return 10.
|
||||
`countingSundays(1995, 2000)` має повернути 10.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1995, 2000), 10);
|
||||
```
|
||||
|
||||
`countingSundays(1901, 2000)` should return 171.
|
||||
`countingSundays(1901, 2000)` має повернути 171.
|
||||
|
||||
```js
|
||||
assert.strictEqual(countingSundays(1901, 2000), 171);
|
||||
|
||||
@@ -16,7 +16,7 @@ By considering the terms in the Fibonacci sequence whose values do not exceed `n
|
||||
|
||||
# --hints--
|
||||
|
||||
`fiboEvenSum(10)` should return a number.
|
||||
`fiboEvenSum(10)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof fiboEvenSum(10) === 'number');
|
||||
@@ -34,37 +34,37 @@ Your function should sum the even-valued Fibonacci numbers: `fiboEvenSum(8)` sho
|
||||
assert.strictEqual(fiboEvenSum(8), 10);
|
||||
```
|
||||
|
||||
`fiboEvenSum(10)` should return 10.
|
||||
`fiboEvenSum(10)` має повернути 10.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(10), 10);
|
||||
```
|
||||
|
||||
`fiboEvenSum(34)` should return 44.
|
||||
`fiboEvenSum(34)` має повернути 44.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(34), 44);
|
||||
```
|
||||
|
||||
`fiboEvenSum(60)` should return 44.
|
||||
`fiboEvenSum(60)` має повернути 44.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(60), 44);
|
||||
```
|
||||
|
||||
`fiboEvenSum(1000)` should return 798.
|
||||
`fiboEvenSum(1000)` має повернути 798.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(1000), 798);
|
||||
```
|
||||
|
||||
`fiboEvenSum(100000)` should return 60696.
|
||||
`fiboEvenSum(100000)` має повернути 60696.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(100000), 60696);
|
||||
```
|
||||
|
||||
`fiboEvenSum(4000000)` should return 4613732.
|
||||
`fiboEvenSum(4000000)` має повернути 4613732.
|
||||
|
||||
```js
|
||||
assert.strictEqual(fiboEvenSum(4000000), 4613732);
|
||||
|
||||
@@ -17,37 +17,37 @@ Find the sum of the digits `n`!
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumFactorialDigits(10)` should return a number.
|
||||
`sumFactorialDigits(10)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof sumFactorialDigits(10) === 'number');
|
||||
```
|
||||
|
||||
`sumFactorialDigits(10)` should return 27.
|
||||
`sumFactorialDigits(10)` має повернути 27.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(10), 27);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(25)` should return 72.
|
||||
`sumFactorialDigits(25)` має повернути 72.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(25), 72);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(50)` should return 216.
|
||||
`sumFactorialDigits(50)` має повернути 216.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(50), 216);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(75)` should return 432.
|
||||
`sumFactorialDigits(75)` має повернути 432.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(75), 432);
|
||||
```
|
||||
|
||||
`sumFactorialDigits(100)` should return 648.
|
||||
`sumFactorialDigits(100)` має повернути 648.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumFactorialDigits(100), 648);
|
||||
|
||||
@@ -18,31 +18,31 @@ Evaluate the sum of all the amicable numbers under `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumAmicableNum(1000)` should return a number.
|
||||
`sumAmicableNum(1000)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof sumAmicableNum(1000) === 'number');
|
||||
```
|
||||
|
||||
`sumAmicableNum(1000)` should return 504.
|
||||
`sumAmicableNum(1000)` має повернути 504.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(1000), 504);
|
||||
```
|
||||
|
||||
`sumAmicableNum(2000)` should return 2898.
|
||||
`sumAmicableNum(2000)` має повернути 2898.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(2000), 2898);
|
||||
```
|
||||
|
||||
`sumAmicableNum(5000)` should return 8442.
|
||||
`sumAmicableNum(5000)` має повернути 8442.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(5000), 8442);
|
||||
```
|
||||
|
||||
`sumAmicableNum(10000)` should return 31626.
|
||||
`sumAmicableNum(10000)` має повернути 31626.
|
||||
|
||||
```js
|
||||
assert.strictEqual(sumAmicableNum(10000), 31626);
|
||||
|
||||
@@ -16,25 +16,25 @@ What is the total of all the name scores in the array?
|
||||
|
||||
# --hints--
|
||||
|
||||
`namesScores(test1)` should return a number.
|
||||
`namesScores(test1)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof namesScores(test1) === 'number');
|
||||
```
|
||||
|
||||
`namesScores(test1)` should return 791.
|
||||
`namesScores(test1)` має повернути 791.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(test1), 791);
|
||||
```
|
||||
|
||||
`namesScores(test2)` should return 1468.
|
||||
`namesScores(test2)` має повернути 1468.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(test2), 1468);
|
||||
```
|
||||
|
||||
`namesScores(names)` should return 871198282.
|
||||
`namesScores(names)` має повернути 871198282.
|
||||
|
||||
```js
|
||||
assert.strictEqual(namesScores(names), 871198282);
|
||||
|
||||
@@ -18,31 +18,31 @@ Find the sum of all positive integers <= `n` which cannot be written as the s
|
||||
|
||||
# --hints--
|
||||
|
||||
`sumOfNonAbundantNumbers(10000)` should return a number.
|
||||
`sumOfNonAbundantNumbers(10000)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof sumOfNonAbundantNumbers(10000) === 'number');
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(10000)` should return 3731004.
|
||||
`sumOfNonAbundantNumbers(10000)` має повернути 3731004.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(10000) === 3731004);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(15000)` should return 4039939.
|
||||
`sumOfNonAbundantNumbers(15000)` має повернути 4039939.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(15000) === 4039939);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(20000)` should return 4159710.
|
||||
`sumOfNonAbundantNumbers(20000)` має повернути 4159710.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(20000) === 4159710);
|
||||
```
|
||||
|
||||
`sumOfNonAbundantNumbers(28123)` should return 4179871.
|
||||
`sumOfNonAbundantNumbers(28123)` має повернути 4179871.
|
||||
|
||||
```js
|
||||
assert(sumOfNonAbundantNumbers(28123) === 4179871);
|
||||
|
||||
@@ -16,31 +16,31 @@ What is the `n`th lexicographic permutation of the digits 0, 1, 2, 3, 4, 5, 6, 7
|
||||
|
||||
# --hints--
|
||||
|
||||
`lexicographicPermutations(699999)` should return a number.
|
||||
`lexicographicPermutations(699999)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof lexicographicPermutations(699999) === 'number');
|
||||
```
|
||||
|
||||
`lexicographicPermutations(699999)` should return 1938246570.
|
||||
`lexicographicPermutations(699999)` має повернути 1938246570.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(699999) == 1938246570);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(899999)` should return 2536987410.
|
||||
`lexicographicPermutations(899999)` має повернути 2536987410.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(899999) == 2536987410);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(900000)` should return 2537014689.
|
||||
`lexicographicPermutations(900000)` має повернути 2537014689.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(900000) == 2537014689);
|
||||
```
|
||||
|
||||
`lexicographicPermutations(999999)` should return 2783915460.
|
||||
`lexicographicPermutations(999999)` має повернути 2783915460.
|
||||
|
||||
```js
|
||||
assert(lexicographicPermutations(999999) == 2783915460);
|
||||
|
||||
@@ -22,31 +22,31 @@ What is the index of the first term in the Fibonacci sequence to contain `n` dig
|
||||
|
||||
# --hints--
|
||||
|
||||
`digitFibonacci(5)` should return a number.
|
||||
`digitFibonacci(5)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof digitFibonacci(5) === 'number');
|
||||
```
|
||||
|
||||
`digitFibonacci(5)` should return 21.
|
||||
`digitFibonacci(5)` має повернути 21.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(5), 21);
|
||||
```
|
||||
|
||||
`digitFibonacci(10)` should return 45.
|
||||
`digitFibonacci(10)` має повернути 45.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(10), 45);
|
||||
```
|
||||
|
||||
`digitFibonacci(15)` should return 69.
|
||||
`digitFibonacci(15)` має повернути 69.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(15), 69);
|
||||
```
|
||||
|
||||
`digitFibonacci(20)` should return 93.
|
||||
`digitFibonacci(20)` має повернути 93.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitFibonacci(20), 93);
|
||||
|
||||
@@ -18,31 +18,31 @@ Find the value of `d` < `n` for which <sup>1</sup>/<sub>d</sub> contains the
|
||||
|
||||
# --hints--
|
||||
|
||||
`reciprocalCycles(700)` should return a number.
|
||||
`reciprocalCycles(700)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof reciprocalCycles(700) === 'number');
|
||||
```
|
||||
|
||||
`reciprocalCycles(700)` should return 659.
|
||||
`reciprocalCycles(700)` має повернути 659.
|
||||
|
||||
```js
|
||||
assert(reciprocalCycles(700) == 659);
|
||||
```
|
||||
|
||||
`reciprocalCycles(800)` should return 743.
|
||||
`reciprocalCycles(800)` має повернути 743.
|
||||
|
||||
```js
|
||||
assert(reciprocalCycles(800) == 743);
|
||||
```
|
||||
|
||||
`reciprocalCycles(900)` should return 887.
|
||||
`reciprocalCycles(900)` має повернути 887.
|
||||
|
||||
```js
|
||||
assert(reciprocalCycles(900) == 887);
|
||||
```
|
||||
|
||||
`reciprocalCycles(1000)` should return 983.
|
||||
`reciprocalCycles(1000)` має повернути 983.
|
||||
|
||||
```js
|
||||
assert(reciprocalCycles(1000) == 983);
|
||||
|
||||
@@ -28,31 +28,31 @@ Find the product of the coefficients, $a$ and $b$, for the quadratic expression
|
||||
|
||||
# --hints--
|
||||
|
||||
`quadraticPrimes(200)` should return a number.
|
||||
`quadraticPrimes(200)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof quadraticPrimes(200) === 'number');
|
||||
```
|
||||
|
||||
`quadraticPrimes(200)` should return -4925.
|
||||
`quadraticPrimes(200)` має повернути -4925.
|
||||
|
||||
```js
|
||||
assert(quadraticPrimes(200) == -4925);
|
||||
```
|
||||
|
||||
`quadraticPrimes(500)` should return -18901.
|
||||
`quadraticPrimes(500)` має повернути -18901.
|
||||
|
||||
```js
|
||||
assert(quadraticPrimes(500) == -18901);
|
||||
```
|
||||
|
||||
`quadraticPrimes(800)` should return -43835.
|
||||
`quadraticPrimes(800)` має повернути -43835.
|
||||
|
||||
```js
|
||||
assert(quadraticPrimes(800) == -43835);
|
||||
```
|
||||
|
||||
`quadraticPrimes(1000)` should return -59231.
|
||||
`quadraticPrimes(1000)` має повернути -59231.
|
||||
|
||||
```js
|
||||
assert(quadraticPrimes(1000) == -59231);
|
||||
|
||||
@@ -24,31 +24,31 @@ What is the sum of the numbers on the diagonals in an `n` by `n` spiral formed i
|
||||
|
||||
# --hints--
|
||||
|
||||
`spiralDiagonals(101)` should return a number.
|
||||
`spiralDiagonals(101)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof spiralDiagonals(101) === 'number');
|
||||
```
|
||||
|
||||
`spiralDiagonals(101)` should return 692101.
|
||||
`spiralDiagonals(101)` має повернути 692101.
|
||||
|
||||
```js
|
||||
assert(spiralDiagonals(101) == 692101);
|
||||
```
|
||||
|
||||
`spiralDiagonals(303)` should return 18591725.
|
||||
`spiralDiagonals(303)` має повернути 18591725.
|
||||
|
||||
```js
|
||||
assert(spiralDiagonals(303) == 18591725);
|
||||
```
|
||||
|
||||
`spiralDiagonals(505)` should return 85986601.
|
||||
`spiralDiagonals(505)` має повернути 85986601.
|
||||
|
||||
```js
|
||||
assert(spiralDiagonals(505) == 85986601);
|
||||
```
|
||||
|
||||
`spiralDiagonals(1001)` should return 669171001.
|
||||
`spiralDiagonals(1001)` має повернути 669171001.
|
||||
|
||||
```js
|
||||
assert(spiralDiagonals(1001) == 669171001);
|
||||
|
||||
@@ -27,31 +27,31 @@ How many distinct terms are in the sequence generated by $a^b$ for 2 ≤ `a` ≤
|
||||
|
||||
# --hints--
|
||||
|
||||
`distinctPowers(15)` should return a number.
|
||||
`distinctPowers(15)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof distinctPowers(15) === 'number');
|
||||
```
|
||||
|
||||
`distinctPowers(15)` should return 177.
|
||||
`distinctPowers(15)` має повернути 177.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPowers(15), 177);
|
||||
```
|
||||
|
||||
`distinctPowers(20)` should return 324.
|
||||
`distinctPowers(20)` має повернути 324.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPowers(20), 324);
|
||||
```
|
||||
|
||||
`distinctPowers(25)` should return 519.
|
||||
`distinctPowers(25)` має повернути 519.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPowers(25), 519);
|
||||
```
|
||||
|
||||
`distinctPowers(30)` should return 755.
|
||||
`distinctPowers(30)` має повернути 755.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPowers(30), 755);
|
||||
|
||||
@@ -14,49 +14,49 @@ What is the largest prime factor of the given `number`?
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestPrimeFactor(2)` should return a number.
|
||||
`largestPrimeFactor(2)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof largestPrimeFactor(2) === 'number');
|
||||
```
|
||||
|
||||
`largestPrimeFactor(2)` should return 2.
|
||||
`largestPrimeFactor(2)` має повернути 2.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(2), 2);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(3)` should return 3.
|
||||
`largestPrimeFactor(3)` має повернути 3.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(3), 3);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(5)` should return 5.
|
||||
`largestPrimeFactor(5)` має повернути 5.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(5), 5);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(7)` should return 7.
|
||||
`largestPrimeFactor(7)` має повернути 7.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(7), 7);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(8)` should return 2.
|
||||
`largestPrimeFactor(8)` має повернути 2.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(8), 2);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(13195)` should return 29.
|
||||
`largestPrimeFactor(13195)` має повернути 29.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(13195), 29);
|
||||
```
|
||||
|
||||
`largestPrimeFactor(600851475143)` should return 6857.
|
||||
`largestPrimeFactor(600851475143)` має повернути 6857.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPrimeFactor(600851475143), 6857);
|
||||
|
||||
@@ -24,31 +24,31 @@ Find the sum of all the numbers that can be written as the sum of `n` powers of
|
||||
|
||||
# --hints--
|
||||
|
||||
`digitnPowers(2)` should return a number.
|
||||
`digitnPowers(2)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof digitnPowers(2) === 'number');
|
||||
```
|
||||
|
||||
`digitnPowers(2)` should return 0.
|
||||
`digitnPowers(2)` має повернути 0.
|
||||
|
||||
```js
|
||||
assert(digitnPowers(2) == 0);
|
||||
```
|
||||
|
||||
`digitnPowers(3)` should return 1301.
|
||||
`digitnPowers(3)` має повернути 1301.
|
||||
|
||||
```js
|
||||
assert(digitnPowers(3) == 1301);
|
||||
```
|
||||
|
||||
`digitnPowers(4)` should return 19316.
|
||||
`digitnPowers(4)` має повернути 19316.
|
||||
|
||||
```js
|
||||
assert(digitnPowers(4) == 19316);
|
||||
```
|
||||
|
||||
`digitnPowers(5)` should return 443839.
|
||||
`digitnPowers(5)` має повернути 443839.
|
||||
|
||||
```js
|
||||
assert(digitnPowers(5) == 443839);
|
||||
|
||||
@@ -20,31 +20,31 @@ How many different ways can `n` pence be made using any number of coins?
|
||||
|
||||
# --hints--
|
||||
|
||||
`coinSums(50)` should return a number.
|
||||
`coinSums(50)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof coinSums(50) === 'number');
|
||||
```
|
||||
|
||||
`coinSums(50)` should return 451.
|
||||
`coinSums(50)` має повернути 451.
|
||||
|
||||
```js
|
||||
assert(coinSums(50) == 451);
|
||||
```
|
||||
|
||||
`coinSums(100)` should return 4563.
|
||||
`coinSums(100)` має повернути 4563.
|
||||
|
||||
```js
|
||||
assert(coinSums(100) == 4563);
|
||||
```
|
||||
|
||||
`coinSums(150)` should return 21873.
|
||||
`coinSums(150)` має повернути 21873.
|
||||
|
||||
```js
|
||||
assert(coinSums(150) == 21873);
|
||||
```
|
||||
|
||||
`coinSums(200)` should return 73682.
|
||||
`coinSums(200)` має повернути 73682.
|
||||
|
||||
```js
|
||||
assert(coinSums(200) == 73682);
|
||||
|
||||
@@ -18,37 +18,37 @@ Find the sum of all products whose multiplicand/multiplier/product identity can
|
||||
|
||||
# --hints--
|
||||
|
||||
`pandigitalProducts(4)` should return a number.
|
||||
`pandigitalProducts(4)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof pandigitalProducts(4) === 'number');
|
||||
```
|
||||
|
||||
`pandigitalProducts(4)` should return `12`.
|
||||
`pandigitalProducts(4)` має повернути `12`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalProducts(4), 12);
|
||||
```
|
||||
|
||||
`pandigitalProducts(6)` should return `162`.
|
||||
`pandigitalProducts(6)` має повернути `162`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalProducts(6), 162);
|
||||
```
|
||||
|
||||
`pandigitalProducts(7)` should return `0`.
|
||||
`pandigitalProducts(7)` має повернути `0`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalProducts(7), 0);
|
||||
```
|
||||
|
||||
`pandigitalProducts(8)` should return `13458`.
|
||||
`pandigitalProducts(8)` має повернути `13458`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalProducts(8), 13458);
|
||||
```
|
||||
|
||||
`pandigitalProducts(9)` should return `45228`.
|
||||
`pandigitalProducts(9)` має повернути `45228`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalProducts(9), 45228);
|
||||
|
||||
@@ -18,13 +18,13 @@ If the product of these four fractions is given in its lowest common terms, find
|
||||
|
||||
# --hints--
|
||||
|
||||
`digitCancellingFractions()` should return a number.
|
||||
`digitCancellingFractions()` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof digitCancellingFractions() === 'number');
|
||||
```
|
||||
|
||||
`digitCancellingFractions()` should return 100.
|
||||
`digitCancellingFractions()` має повернути 100.
|
||||
|
||||
```js
|
||||
assert.strictEqual(digitCancellingFractions(), 100);
|
||||
|
||||
@@ -16,13 +16,13 @@ Find the numbers and the sum of the numbers which are equal to the sum of the fa
|
||||
|
||||
# --hints--
|
||||
|
||||
`digitFactorial()` should return an object.
|
||||
`digitFactorial()` має повернути об’єкт.
|
||||
|
||||
```js
|
||||
assert.typeOf(digitFactorial(), 'object');
|
||||
```
|
||||
|
||||
`digitFactorial()` should return { sum: 40730, numbers: [145, 40585] }.
|
||||
`digitFactorial()` має повернути { sum: 40730, numbers: [145, 40585] }.
|
||||
|
||||
```js
|
||||
assert.deepEqual(digitFactorial(), { sum: 40730, numbers: [145, 40585] });
|
||||
|
||||
@@ -20,43 +20,43 @@ Circular primes individual rotation can exceed `n`.
|
||||
|
||||
# --hints--
|
||||
|
||||
`circularPrimes(100)` should return a number.
|
||||
`circularPrimes(100)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof circularPrimes(100) === 'number');
|
||||
```
|
||||
|
||||
`circularPrimes(100)` should return 13.
|
||||
`circularPrimes(100)` має повернути 13.
|
||||
|
||||
```js
|
||||
assert(circularPrimes(100) == 13);
|
||||
```
|
||||
|
||||
`circularPrimes(100000)` should return 43.
|
||||
`circularPrimes(100000)` має повернути 43.
|
||||
|
||||
```js
|
||||
assert(circularPrimes(100000) == 43);
|
||||
```
|
||||
|
||||
`circularPrimes(250000)` should return 45.
|
||||
`circularPrimes(250000)` має повернути 45.
|
||||
|
||||
```js
|
||||
assert(circularPrimes(250000) == 45);
|
||||
```
|
||||
|
||||
`circularPrimes(500000)` should return 49.
|
||||
`circularPrimes(500000)` має повернути 49.
|
||||
|
||||
```js
|
||||
assert(circularPrimes(500000) == 49);
|
||||
```
|
||||
|
||||
`circularPrimes(750000)` should return 49.
|
||||
`circularPrimes(750000)` має повернути 49.
|
||||
|
||||
```js
|
||||
assert(circularPrimes(750000) == 49);
|
||||
```
|
||||
|
||||
`circularPrimes(1000000)` should return 55.
|
||||
`circularPrimes(1000000)` має повернути 55.
|
||||
|
||||
```js
|
||||
assert(circularPrimes(1000000) == 55);
|
||||
|
||||
@@ -16,31 +16,31 @@ Find the sum of all numbers, less than `n`, whereas 1000 ≤ `n` ≤ 1000000, wh
|
||||
|
||||
# --hints--
|
||||
|
||||
`doubleBasePalindromes(1000)` should return a number.
|
||||
`doubleBasePalindromes(1000)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof doubleBasePalindromes(1000) === 'number');
|
||||
```
|
||||
|
||||
`doubleBasePalindromes(1000)` should return 1772.
|
||||
`doubleBasePalindromes(1000)` має повернути 1772.
|
||||
|
||||
```js
|
||||
assert(doubleBasePalindromes(1000) == 1772);
|
||||
```
|
||||
|
||||
`doubleBasePalindromes(50000)` should return 105795.
|
||||
`doubleBasePalindromes(50000)` має повернути 105795.
|
||||
|
||||
```js
|
||||
assert(doubleBasePalindromes(50000) == 105795);
|
||||
```
|
||||
|
||||
`doubleBasePalindromes(500000)` should return 286602.
|
||||
`doubleBasePalindromes(500000)` має повернути 286602.
|
||||
|
||||
```js
|
||||
assert(doubleBasePalindromes(500000) == 286602);
|
||||
```
|
||||
|
||||
`doubleBasePalindromes(1000000)` should return 872187.
|
||||
`doubleBasePalindromes(1000000)` має повернути 872187.
|
||||
|
||||
```js
|
||||
assert(doubleBasePalindromes(1000000) == 872187);
|
||||
|
||||
@@ -16,31 +16,31 @@ NOTE: 2, 3, 5, and 7 are not considered to be truncatable primes.
|
||||
|
||||
# --hints--
|
||||
|
||||
`truncatablePrimes(8)` should return a number.
|
||||
`truncatablePrimes(8)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof truncatablePrimes(8) === 'number');
|
||||
```
|
||||
|
||||
`truncatablePrimes(8)` should return 1986.
|
||||
`truncatablePrimes(8)` має повернути 1986.
|
||||
|
||||
```js
|
||||
assert(truncatablePrimes(8) == 1986);
|
||||
```
|
||||
|
||||
`truncatablePrimes(9)` should return 5123.
|
||||
`truncatablePrimes(9)` має повернути 5123.
|
||||
|
||||
```js
|
||||
assert(truncatablePrimes(9) == 5123);
|
||||
```
|
||||
|
||||
`truncatablePrimes(10)` should return 8920.
|
||||
`truncatablePrimes(10)` має повернути 8920.
|
||||
|
||||
```js
|
||||
assert(truncatablePrimes(10) == 8920);
|
||||
```
|
||||
|
||||
`truncatablePrimes(11)` should return 748317.
|
||||
`truncatablePrimes(11)` має повернути 748317.
|
||||
|
||||
```js
|
||||
assert(truncatablePrimes(11) == 748317);
|
||||
|
||||
@@ -22,19 +22,19 @@ What is the largest 1 to `k` pandigital `k`-digit number that can be formed as t
|
||||
|
||||
# --hints--
|
||||
|
||||
`pandigitalMultiples(8)` should return a number.
|
||||
`pandigitalMultiples(8)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof pandigitalMultiples(8) === 'number');
|
||||
```
|
||||
|
||||
`pandigitalMultiples(8)` should return `78156234`.
|
||||
`pandigitalMultiples(8)` має повернути `78156234`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalMultiples(8), 78156234);
|
||||
```
|
||||
|
||||
`pandigitalMultiples(9)` should return `932718654`.
|
||||
`pandigitalMultiples(9)` має повернути `932718654`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pandigitalMultiples(9), 932718654);
|
||||
|
||||
@@ -16,31 +16,31 @@ For which value of `p` ≤ `n`, is the number of solutions maximized?
|
||||
|
||||
# --hints--
|
||||
|
||||
`intRightTriangles(500)` should return a number.
|
||||
`intRightTriangles(500)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof intRightTriangles(500) === 'number');
|
||||
```
|
||||
|
||||
`intRightTriangles(500)` should return 420.
|
||||
`intRightTriangles(500)` має повернути 420.
|
||||
|
||||
```js
|
||||
assert(intRightTriangles(500) == 420);
|
||||
```
|
||||
|
||||
`intRightTriangles(800)` should return 720.
|
||||
`intRightTriangles(800)` має повернути 720.
|
||||
|
||||
```js
|
||||
assert(intRightTriangles(800) == 720);
|
||||
```
|
||||
|
||||
`intRightTriangles(900)` should return 840.
|
||||
`intRightTriangles(900)` має повернути 840.
|
||||
|
||||
```js
|
||||
assert(intRightTriangles(900) == 840);
|
||||
```
|
||||
|
||||
`intRightTriangles(1000)` should return 840.
|
||||
`intRightTriangles(1000)` має повернути 840.
|
||||
|
||||
```js
|
||||
assert(intRightTriangles(1000) == 840);
|
||||
|
||||
@@ -14,19 +14,19 @@ Find the largest palindrome made from the product of two `n`-digit numbers.
|
||||
|
||||
# --hints--
|
||||
|
||||
`largestPalindromeProduct(2)` should return a number.
|
||||
`largestPalindromeProduct(2)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof largestPalindromeProduct(2) === 'number');
|
||||
```
|
||||
|
||||
`largestPalindromeProduct(2)` should return 9009.
|
||||
`largestPalindromeProduct(2)` має повернути 9009.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPalindromeProduct(2), 9009);
|
||||
```
|
||||
|
||||
`largestPalindromeProduct(3)` should return 906609.
|
||||
`largestPalindromeProduct(3)` має повернути 906609.
|
||||
|
||||
```js
|
||||
assert.strictEqual(largestPalindromeProduct(3), 906609);
|
||||
|
||||
@@ -20,25 +20,25 @@ d<sub>1</sub> × d<sub>10</sub> × d<sub>100</sub> × d<sub>1000</sub> × d<sub>
|
||||
|
||||
# --hints--
|
||||
|
||||
`champernownesConstant(100)` should return a number.
|
||||
`champernownesConstant(100)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof champernownesConstant(100) === 'number');
|
||||
```
|
||||
|
||||
`champernownesConstant(100)` should return 5.
|
||||
`champernownesConstant(100)` має повернути 5.
|
||||
|
||||
```js
|
||||
assert.strictEqual(champernownesConstant(100), 5);
|
||||
```
|
||||
|
||||
`champernownesConstant(1000)` should return 15.
|
||||
`champernownesConstant(1000)` має повернути 15.
|
||||
|
||||
```js
|
||||
assert.strictEqual(champernownesConstant(1000), 15);
|
||||
```
|
||||
|
||||
`champernownesConstant(1000000)` should return 210.
|
||||
`champernownesConstant(1000000)` має повернути 210.
|
||||
|
||||
```js
|
||||
assert.strictEqual(champernownesConstant(1000000), 210);
|
||||
|
||||
@@ -14,19 +14,19 @@ What is the largest `n`-length digit pandigital prime that exists?
|
||||
|
||||
# --hints--
|
||||
|
||||
`pandigitalPrime(4)` should return a number.
|
||||
`pandigitalPrime(4)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof pandigitalPrime(4) === 'number');
|
||||
```
|
||||
|
||||
`pandigitalPrime(4)` should return 4231.
|
||||
`pandigitalPrime(4)` має повернути 4231.
|
||||
|
||||
```js
|
||||
assert(pandigitalPrime(4) == 4231);
|
||||
```
|
||||
|
||||
`pandigitalPrime(7)` should return 7652413.
|
||||
`pandigitalPrime(7)` має повернути 7652413.
|
||||
|
||||
```js
|
||||
assert(pandigitalPrime(7) == 7652413);
|
||||
|
||||
@@ -18,31 +18,31 @@ Using words array of `n`-length, how many are triangle words?
|
||||
|
||||
# --hints--
|
||||
|
||||
`codedTriangleNumbers(1400)` should return a number.
|
||||
`codedTriangleNumbers(1400)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof codedTriangleNumbers(1400) === 'number');
|
||||
```
|
||||
|
||||
`codedTriangleNumbers(1400)` should return 129.
|
||||
`codedTriangleNumbers(1400)` має повернути 129.
|
||||
|
||||
```js
|
||||
assert(codedTriangleNumbers(1400) == 129);
|
||||
```
|
||||
|
||||
`codedTriangleNumbers(1500)` should return 137.
|
||||
`codedTriangleNumbers(1500)` має повернути 137.
|
||||
|
||||
```js
|
||||
assert(codedTriangleNumbers(1500) == 137);
|
||||
```
|
||||
|
||||
`codedTriangleNumbers(1600)` should return 141.
|
||||
`codedTriangleNumbers(1600)` має повернути 141.
|
||||
|
||||
```js
|
||||
assert(codedTriangleNumbers(1600) == 141);
|
||||
```
|
||||
|
||||
`codedTriangleNumbers(1786)` should return 162.
|
||||
`codedTriangleNumbers(1786)` має повернути 162.
|
||||
|
||||
```js
|
||||
assert(codedTriangleNumbers(1786) == 162);
|
||||
|
||||
@@ -26,31 +26,31 @@ Find the sum of all 0 to `n` pandigital numbers with sub-strings fulfilling `n -
|
||||
|
||||
# --hints--
|
||||
|
||||
`substringDivisibility(5)` should return a number.
|
||||
`substringDivisibility(5)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof substringDivisibility(5) === 'number');
|
||||
```
|
||||
|
||||
`substringDivisibility(5)` should return `12444480`.
|
||||
`substringDivisibility(5)` має повернути `12444480`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(substringDivisibility(5), 12444480)
|
||||
```
|
||||
|
||||
`substringDivisibility(7)` should return `1099210170`.
|
||||
`substringDivisibility(7)` має повернути `1099210170`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(substringDivisibility(7), 1099210170)
|
||||
```
|
||||
|
||||
`substringDivisibility(8)` should return `1113342912`.
|
||||
`substringDivisibility(8)` має повернути `1113342912`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(substringDivisibility(8), 1113342912)
|
||||
```
|
||||
|
||||
`substringDivisibility(9)` should return `16695334890`.
|
||||
`substringDivisibility(9)` має повернути `16695334890`.
|
||||
|
||||
```js
|
||||
assert.strictEqual(substringDivisibility(9), 16695334890)
|
||||
|
||||
@@ -18,13 +18,13 @@ Find the pair of pentagonal numbers, P<sub>j</sub> and P<sub>k</sub>, for which
|
||||
|
||||
# --hints--
|
||||
|
||||
`pentagonNumbers()` should return a number.
|
||||
`pentagonNumbers()` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof pentagonNumbers() === 'number');
|
||||
```
|
||||
|
||||
`pentagonNumbers()` should return 5482660.
|
||||
`pentagonNumbers()` має повернути 5482660.
|
||||
|
||||
```js
|
||||
assert.strictEqual(pentagonNumbers(), 5482660);
|
||||
|
||||
@@ -20,13 +20,13 @@ Find the next triangle number that is also pentagonal and hexagonal.
|
||||
|
||||
# --hints--
|
||||
|
||||
`triPentaHexa(40756)` should return a number.
|
||||
`triPentaHexa(40756)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof triPentaHexa(40756) === 'number');
|
||||
```
|
||||
|
||||
`triPentaHexa(40756)` should return 1533776805.
|
||||
`triPentaHexa(40756)` має повернути 1533776805.
|
||||
|
||||
```js
|
||||
assert.strictEqual(triPentaHexa(40756), 1533776805);
|
||||
|
||||
@@ -25,13 +25,13 @@ What is the smallest odd composite that cannot be written as the sum of a prime
|
||||
|
||||
# --hints--
|
||||
|
||||
`goldbachsOtherConjecture()` should return a number.
|
||||
`goldbachsOtherConjecture()` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof goldbachsOtherConjecture() === 'number');
|
||||
```
|
||||
|
||||
`goldbachsOtherConjecture()` should return 5777.
|
||||
`goldbachsOtherConjecture()` має повернути 5777.
|
||||
|
||||
```js
|
||||
assert.strictEqual(goldbachsOtherConjecture(), 5777);
|
||||
|
||||
@@ -27,25 +27,25 @@ Find the first four consecutive integers to have four distinct prime factors eac
|
||||
|
||||
# --hints--
|
||||
|
||||
`distinctPrimeFactors(2, 2)` should return a number.
|
||||
`distinctPrimeFactors(2, 2)` має повернути число.
|
||||
|
||||
```js
|
||||
assert(typeof distinctPrimeFactors(2, 2) === 'number');
|
||||
```
|
||||
|
||||
`distinctPrimeFactors(2, 2)` should return 14.
|
||||
`distinctPrimeFactors(2, 2)` має повернути 14.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPrimeFactors(2, 2), 14);
|
||||
```
|
||||
|
||||
`distinctPrimeFactors(3, 3)` should return 644.
|
||||
`distinctPrimeFactors(3, 3)` має повернути 644.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPrimeFactors(3, 3), 644);
|
||||
```
|
||||
|
||||
`distinctPrimeFactors(4, 4)` should return 134043.
|
||||
`distinctPrimeFactors(4, 4)` має повернути 134043.
|
||||
|
||||
```js
|
||||
assert.strictEqual(distinctPrimeFactors(4, 4), 134043);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user