chore(i18n,curriculum): update translations (#43132)
This commit is contained in:
@ -20,7 +20,7 @@ function findGreater(a, b) {
|
||||
return "a is greater";
|
||||
}
|
||||
else {
|
||||
return "b is greater";
|
||||
return "b is greater or equal";
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -29,7 +29,7 @@ function findGreater(a, b) {
|
||||
|
||||
```js
|
||||
function findGreater(a, b) {
|
||||
return a > b ? "a is greater" : "b is greater";
|
||||
return a > b ? "a is greater" : "b is greater or equal";
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -20,7 +20,7 @@ function findGreater(a, b) {
|
||||
return "a is greater";
|
||||
}
|
||||
else {
|
||||
return "b is greater";
|
||||
return "b is greater or equal";
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -29,7 +29,7 @@ function findGreater(a, b) {
|
||||
|
||||
```js
|
||||
function findGreater(a, b) {
|
||||
return a > b ? "a is greater" : "b is greater";
|
||||
return a > b ? "a is greater" : "b is greater or equal";
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -20,7 +20,7 @@ function findGreater(a, b) {
|
||||
return "a is greater";
|
||||
}
|
||||
else {
|
||||
return "b is greater";
|
||||
return "b is greater or equal";
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -29,7 +29,7 @@ Esto puede reescribirse usando el operador condicional:
|
||||
|
||||
```js
|
||||
function findGreater(a, b) {
|
||||
return a > b ? "a is greater" : "b is greater";
|
||||
return a > b ? "a is greater" : "b is greater or equal";
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -20,7 +20,7 @@ function findGreater(a, b) {
|
||||
return "a is greater";
|
||||
}
|
||||
else {
|
||||
return "b is greater";
|
||||
return "b is greater or equal";
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -29,7 +29,7 @@ Questo può essere riscritto utilizzando l'operatore condizionale:
|
||||
|
||||
```js
|
||||
function findGreater(a, b) {
|
||||
return a > b ? "a is greater" : "b is greater";
|
||||
return a > b ? "a is greater" : "b is greater or equal";
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -20,7 +20,7 @@ function findGreater(a, b) {
|
||||
return "a is greater";
|
||||
}
|
||||
else {
|
||||
return "b is greater";
|
||||
return "b is greater or equal";
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -29,7 +29,7 @@ Isto pode ser reescrito usando o operador condicional:
|
||||
|
||||
```js
|
||||
function findGreater(a, b) {
|
||||
return a > b ? "a is greater" : "b is greater";
|
||||
return a > b ? "a is greater" : "b is greater or equal";
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -8,69 +8,69 @@ dashedName: cusip
|
||||
|
||||
# --description--
|
||||
|
||||
A **CUSIP** is a nine-character alphanumeric code that identifies a North American financial security for the purposes of facilitating clearing and settlement of trades. The CUSIP was adopted as an American National Standard under Accredited Standards X9.6.
|
||||
O **CUSIP** é um código alfanumérico de nove caracteres que identifica uma segurança financeira norte-americana visando facilitar a compensação e liquidação de negociações. O CUSIP foi adotado como um Padrão Nacional Americano segundo as Accredited Standards X9.6.
|
||||
|
||||
# --instructions--
|
||||
|
||||
Write a function that takes a string as a parameter and checks if the string is valid CUSIP.
|
||||
Escreva uma função que recebe uma string como um parâmetro e verifica se a string é um CUSIP válido.
|
||||
|
||||
# --hints--
|
||||
|
||||
`isCusip` should be a function.
|
||||
`isCusip` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof isCusip == 'function');
|
||||
```
|
||||
|
||||
`isCusip("037833100")` should return a boolean.
|
||||
`isCusip("037833100")` deve retornar um booleano.
|
||||
|
||||
```js
|
||||
assert(typeof isCusip('037833100') == 'boolean');
|
||||
```
|
||||
|
||||
`isCusip("037833100")` should return `true`.
|
||||
`isCusip("037833100")` deve retornar `true`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('037833100'), true);
|
||||
```
|
||||
|
||||
`isCusip("17275R102")` should return `true`.
|
||||
`isCusip("17275R102")` deve retornar `true`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('17275R102'), true);
|
||||
```
|
||||
|
||||
`isCusip("38259P50a")` should return `false`.
|
||||
`isCusip("38259P50a")` deve retornar `false`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('38259P50a'), false);
|
||||
```
|
||||
|
||||
`isCusip("38259P508")` should return `true`.
|
||||
`isCusip("38259P508")` deve retornar `true`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('38259P508'), true);
|
||||
```
|
||||
|
||||
`isCusip("38259P50#")` should return `false`.
|
||||
`isCusip("38259P50#")` deve retornar `false`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('38259P50#'), false);
|
||||
```
|
||||
|
||||
`isCusip("68389X105")` should return `true`.
|
||||
`isCusip("68389X105")` deve retornar `true`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('68389X105'), true);
|
||||
```
|
||||
|
||||
`isCusip("68389X106")` should return `false`.
|
||||
`isCusip("68389X106")` deve retornar `false`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('68389X106'), false);
|
||||
```
|
||||
|
||||
`isCusip("5949181")` should return `false`.
|
||||
`isCusip("5949181")` deve retornar `false`.
|
||||
|
||||
```js
|
||||
assert.equal(isCusip('5949181'), false);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5a23c84252665b21eecc7e06
|
||||
title: Cut a rectangle
|
||||
title: Cortar um retângulo
|
||||
challengeType: 5
|
||||
forumTopicId: 302242
|
||||
dashedName: cut-a-rectangle
|
||||
@ -8,7 +8,7 @@ dashedName: cut-a-rectangle
|
||||
|
||||
# --description--
|
||||
|
||||
A given rectangle is made from *m* × *n* squares. If *m* and *n* are not both odd, then it is possible to cut a path through the rectangle along the square edges such that the rectangle splits into two connected pieces with the same shape (after rotating one of the pieces by 180°). All such paths for 2 × 2 and 4 × 3 rectangles are shown below.
|
||||
Um retângulo dado é feito de *m* × *n* quadrados. Se *m* e *n* não são forem ímpares, então é possível cortar um caminho através do retângulo ao longo das bordas quadradas, de modo que o retângulo se divida em duas partes conectadas com a mesma forma (depois de girar uma das partes em 180°). Todos os caminhos para retângulos 2 × 2 e 4 × 3 são mostrados abaixo.
|
||||
|
||||
<div style="width: 100%; text-align: center;">
|
||||
<svg xmlns="https://www.w3.org/2000/svg" xmlns:xlink="https://www.w3.org/1999/xlink" width="520" height="170" aria-hidden="true" alt="Diagram showing the possible paths for 2 by 2 and 4 by 3 rectangles">
|
||||
@ -92,47 +92,47 @@ A given rectangle is made from *m* × *n* squares. If *m* and *n* are not both o
|
||||
|
||||
# --instructions--
|
||||
|
||||
Write a function that calculates the number of different ways to cut an *m* × *n* rectangle.
|
||||
Escreva uma função que calcula o número de diferentes formas de cortar um retângulo de *m* × *n*.
|
||||
|
||||
# --hints--
|
||||
|
||||
`cutRectangle` should be a function.
|
||||
`cutRectangle` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof cutRectangle == 'function');
|
||||
```
|
||||
|
||||
`cutRectangle(2, 2)` should return a number.
|
||||
`cutRectangle(2, 2)` deve retornar um número.
|
||||
|
||||
```js
|
||||
assert(typeof cutRectangle(2, 2) == 'number');
|
||||
```
|
||||
|
||||
`cutRectangle(2, 2)` should return `2`.
|
||||
`cutRectangle(2, 2)` deve retornar `2`.
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(2, 2), 2);
|
||||
```
|
||||
|
||||
`cutRectangle(4, 3)` should return `9`.
|
||||
`cutRectangle(4, 3)` deve retornar `9`.
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(4, 3), 9);
|
||||
```
|
||||
|
||||
`cutRectangle(4, 4)` should return `22`.
|
||||
`cutRectangle(4, 4)` deve retornar `22`.
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(4, 4), 22);
|
||||
```
|
||||
|
||||
`cutRectangle(8, 3)` should return `53`.
|
||||
`cutRectangle(8, 3)` deve retornar `53`.
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(8, 3), 53);
|
||||
```
|
||||
|
||||
`cutRectangle(7, 4)` should return `151`.
|
||||
`cutRectangle(7, 4)` deve retornar `151`.
|
||||
|
||||
```js
|
||||
assert.equal(cutRectangle(7, 4), 151);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 59669d08d75b60482359409f
|
||||
title: Date format
|
||||
title: Formato de data
|
||||
challengeType: 5
|
||||
forumTopicId: 302243
|
||||
dashedName: date-format
|
||||
@ -8,15 +8,15 @@ dashedName: date-format
|
||||
|
||||
# --description--
|
||||
|
||||
Return an array with two date strings of the current date with the following specifications:
|
||||
Retorna um array com duas strings de data com a data atual de acordo com as seguintes especificações:
|
||||
|
||||
- The first string's date order should be the year number, month number, and day number separated by dashes (`-`).
|
||||
- The first string's year should be four digits in length.
|
||||
- The first string's month and day should not contain any leading zeros.
|
||||
- The second string's weekday and month names should not be abbreviated.
|
||||
- The second string's day should not contain any leading zeros.
|
||||
- A ordem de data da primeira string deve ser o número do ano, o número do mês e o número do dia separados por traços (`-`).
|
||||
- O ano da primeira string deve ter quatro dígitos de tamanho.
|
||||
- O mês e o dia da primeira string não devem conter zeros precedentes.
|
||||
- Os nomes dos dias e dos meses na segunda string não devem ser abreviados.
|
||||
- O dia da segunda string não deve conter zeros precedentes.
|
||||
|
||||
Example outputs:
|
||||
Exemplos de saída:
|
||||
|
||||
```js
|
||||
['2007-11-23', 'Friday, November 23, 2007']
|
||||
@ -25,25 +25,25 @@ Example outputs:
|
||||
|
||||
# --hints--
|
||||
|
||||
`getDateFormats` should be a function.
|
||||
`getDateFormats` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof getDateFormats === 'function');
|
||||
```
|
||||
|
||||
`getDateFormats` should return an object.
|
||||
`getDateFormats` deve retornar um objeto.
|
||||
|
||||
```js
|
||||
assert(typeof getDateFormats() === 'object');
|
||||
```
|
||||
|
||||
`getDateFormats` should return an array with 2 elements.
|
||||
`getDateFormats` deve retornar um array com 2 elementos.
|
||||
|
||||
```js
|
||||
assert(getDateFormats().length === 2);
|
||||
```
|
||||
|
||||
`getDateFormats` should return the correct date in the right format
|
||||
`getDateFormats` deve retornar a data correta no formato certo
|
||||
|
||||
```js
|
||||
assert.deepEqual(getDateFormats(), dates, equalsMessage);
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5966c21cf732a95f1b67dd28
|
||||
title: Date manipulation
|
||||
title: Manipulação de datas
|
||||
challengeType: 5
|
||||
forumTopicId: 302244
|
||||
dashedName: date-manipulation
|
||||
@ -8,27 +8,27 @@ dashedName: date-manipulation
|
||||
|
||||
# --description--
|
||||
|
||||
Given a date string in EST, output the given date as a string with 12 hours added to the time. Time zone should be preserved.
|
||||
Dada uma string de data no fuso horário EST, retorne a data informada como uma string com 12 horas adicionadas à hora. O fuso horário deve ser preservado.
|
||||
|
||||
Example input: `"March 6 2009 7:30pm EST"`
|
||||
Exemplo de entrada: `"March 6 2009 7:30pm EST"`
|
||||
|
||||
Example output: `"March 7 2009 7:30am EST"`
|
||||
Exemplo de saída: `"March 7 2009 7:30am EST"`
|
||||
|
||||
# --hints--
|
||||
|
||||
`add12Hours` should be a function.
|
||||
`add12Hours` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof add12Hours === 'function');
|
||||
```
|
||||
|
||||
`add12Hours(dateString)` should return a string.
|
||||
`add12Hours(dateString)` deve retornar uma string.
|
||||
|
||||
```js
|
||||
assert(typeof add12Hours('January 17 2017 11:43am EST') === 'string');
|
||||
```
|
||||
|
||||
`add12Hours("January 17 2017 11:43am EST")` should return `"January 17 2017 11:43pm EST"`
|
||||
`add12Hours("January 17 2017 11:43am EST")` deve retornar `"January 17 2017 11:43pm EST"`
|
||||
|
||||
```js
|
||||
assert(
|
||||
@ -36,25 +36,25 @@ assert(
|
||||
);
|
||||
```
|
||||
|
||||
Should handle day change. `add12Hours("March 6 2009 7:30pm EST")` should return `"March 7 2009 7:30am EST"`
|
||||
A função deve tratar da mudança de dia. `add12Hours("March 6 2009 7:30pm EST")` deve retornar `"March 7 2009 7:30am EST"`
|
||||
|
||||
```js
|
||||
assert(add12Hours('March 6 2009 7:30pm EST') === 'March 7 2009 7:30am EST');
|
||||
```
|
||||
|
||||
Should handle month change in a leap years. `add12Hours("February 29 2004 9:15pm EST")` should return `"March 1 2004 9:15am EST"`
|
||||
Deve lidar com a mudança de meses em anos bissextos. `add12Hours("February 29 2004 9:15pm EST")` deve retornar `"March 1 2004 9:15am EST"`
|
||||
|
||||
```js
|
||||
assert(add12Hours('February 29 2004 9:15pm EST') === 'March 1 2004 9:15am EST');
|
||||
```
|
||||
|
||||
Should handle month change in a common years. `add12Hours("February 28 1999 3:15pm EST")` should return `"March 1 1999 3:15am EST"`
|
||||
Deve lidar com a mudança de meses em anos normais. `add12Hours("February 28 1999 3:15pm EST")` deve retornar `"March 1 1999 3:15am EST"`
|
||||
|
||||
```js
|
||||
assert(add12Hours('February 28 1999 3:15pm EST') === 'March 1 1999 3:15am EST');
|
||||
```
|
||||
|
||||
Should handle year change. `add12Hours("December 31 2020 1:45pm EST")` should return `"January 1 2021 1:45am EST"`
|
||||
A função deve tratar da mudança de ano. `add12Hours("December 31 2020 1:45pm EST")` deve retornar `"January 1 2021 1:45am EST"`
|
||||
|
||||
```js
|
||||
assert(
|
||||
|
@ -1,6 +1,6 @@
|
||||
---
|
||||
id: 5966f99c45e8976909a85575
|
||||
title: Day of the week
|
||||
title: Dia da semana
|
||||
challengeType: 5
|
||||
forumTopicId: 302245
|
||||
dashedName: day-of-the-week
|
||||
@ -8,33 +8,33 @@ dashedName: day-of-the-week
|
||||
|
||||
# --description--
|
||||
|
||||
A company decides that whenever Xmas falls on a Sunday they will give their workers all extra paid holidays so that, together with any public holidays, workers will not have to work the following week (between the 25th of December and the first of January).
|
||||
Uma empresa decide que, sempre que o Natal cai num domingo, dará aos seus trabalhadores todas as férias remuneradas extra, para que, juntamente com quaisquer feriados públicos, os trabalhadores não tenham de trabalhar na semana seguinte (entre 25 de dezembro e 1 de janeiro).
|
||||
|
||||
# --instructions--
|
||||
|
||||
Write a function that takes a start year and an end year and return an array of all the years where the 25th of December will be a Sunday.
|
||||
Escreva uma função que leve um ano de início e um ano de fim e retorne um array de todos os anos onde o dia 25 de dezembro será um domingo.
|
||||
|
||||
# --hints--
|
||||
|
||||
`findXmasSunday` should be a function.
|
||||
`findXmasSunday` deve ser uma função.
|
||||
|
||||
```js
|
||||
assert(typeof findXmasSunday === 'function');
|
||||
```
|
||||
|
||||
`findXmasSunday(2000, 2100)` should return an array.
|
||||
`findXmasSunday(2000, 2100)` deve retornar um array.
|
||||
|
||||
```js
|
||||
assert(typeof findXmasSunday(2000, 2100) === 'object');
|
||||
```
|
||||
|
||||
`findXmasSunday(1970, 2017)` should return `[1977, 1983, 1988, 1994, 2005, 2011, 2016]`
|
||||
`findXmasSunday(1970, 2017)` deve retornar `[1977, 1983, 1988, 1994, 2005, 2011, 2016]`
|
||||
|
||||
```js
|
||||
assert.deepEqual(findXmasSunday(1970, 2017), firstSolution);
|
||||
```
|
||||
|
||||
`findXmasSunday(2008, 2121)` should return `[2011, 2016, 2022, 2033, 2039, 2044, 2050, 2061, 2067, 2072, 2078, 2089, 2095, 2101, 2107, 2112, 2118]`
|
||||
`findXmasSunday(2008, 2121)` deve retornar `[2011, 2016, 2022, 2033, 2039, 2044, 2050, 2061, 2067, 2072, 2078, 2089, 2095, 2101, 2107, 2112, 2118]`
|
||||
|
||||
```js
|
||||
assert.deepEqual(findXmasSunday(2008, 2121), secondSolution);
|
||||
|
Reference in New Issue
Block a user