chore(i18n,curriculum): update translations (#43140)

This commit is contained in:
camperbot
2021-08-09 17:35:35 +09:00
committed by GitHub
parent dd5d2919be
commit 919728131e
64 changed files with 852 additions and 844 deletions

View File

@ -1,6 +1,6 @@
---
id: 5a23c84252665b21eecc7e7b
title: Generator/Exponential
title: Gerador/exponencial
challengeType: 5
forumTopicId: 302275
dashedName: generatorexponential
@ -8,59 +8,59 @@ dashedName: generatorexponential
# --description--
A generator is an executable entity (like a function or procedure) that contains code that yields a sequence of values, one at a time, so that each time you call the generator, the next value in the sequence is provided.
Um gerador é uma entidade executável (como uma função ou procedimento) que contém um código que retorna uma sequência de valores, um de cada vez, para que a cada vez que você chame o gerador, o próximo valor na sequência seja fornecido.
Generators are often built on top of coroutines or objects so that the internal state of the object is handled "naturally".
Os geradores muitas vezes são criados a partir de co-rotinas ou objetos para que o estado interno do objeto seja tratado "naturalmente".
Generators are often used in situations where a sequence is potentially infinite, and where it is possible to construct the next value of the sequence with only minimal state.
Os geradores são, frequentemente, usados em situações onde uma sequência é potencialmente infinita, e onde é possível construir o valor seguinte da sequência apenas com o estado mínimo.
# --instructions--
Write a function that uses generators to generate squares and cubes. Create a new generator that filters all cubes from the generator of squares.
Escreva uma função que use geradores para gerar quadrados e cubos. Crie um novo gerador que filtre todos os cubos do gerador de quadrados.
The function should return the \\( n^{th} \\) value of the filtered generator.
A função deve retornar o enésimo \\( n^{th} \\) valor do gerador filtrado.
For example for \\(n=7\\), the function should return 81 as the sequence would be 4, 9, 16, 25, 36, 49, 81. Here 64 is filtered out, as it is a cube.
Por exemplo, para \\(n=7\\), a função deve retornar 81, já que a sequência seria 4, 9, 16, 25, 36, 49, 81. Aqui, 64 é removido da sequência por ser um cubo.
# --hints--
`exponentialGenerator` should be a function.
`exponentialGenerator` deve ser uma função.
```js
assert(typeof exponentialGenerator == 'function');
```
`exponentialGenerator()` should return a number.
`exponentialGenerator()` deve retornar um número.
```js
assert(typeof exponentialGenerator(10) == 'number');
```
`exponentialGenerator(10)` should return `144`.
`exponentialGenerator(10)` deve retornar `144`.
```js
assert.equal(exponentialGenerator(10), 144);
```
`exponentialGenerator(12)` should return `196`.
`exponentialGenerator(12)` deve retornar `196`.
```js
assert.equal(exponentialGenerator(12), 196);
```
`exponentialGenerator(14)` should return `256`.
`exponentialGenerator(14)` deve retornar `256`.
```js
assert.equal(exponentialGenerator(14), 256);
```
`exponentialGenerator(20)` should return `484`.
`exponentialGenerator(20)` deve retornar `484`.
```js
assert.equal(exponentialGenerator(20), 484);
```
`exponentialGenerator(25)` should return `784`.
`exponentialGenerator(25)` deve retornar `784`.
```js
assert.equal(exponentialGenerator(25), 784);