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

This commit is contained in:
camperbot
2021-08-20 00:00:51 -07:00
committed by GitHub
parent 1b7ddb13d2
commit 703394b127
130 changed files with 691 additions and 600 deletions

View File

@ -1,6 +1,6 @@
---
id: 5a23c84252665b21eecc7eb1
title: Identity matrix
title: Matriz identidade
challengeType: 5
forumTopicId: 302290
dashedName: identity-matrix
@ -8,7 +8,7 @@ dashedName: identity-matrix
# --description--
An *identity matrix* is a square matrix of size \\( n \\times n \\), where the diagonal elements are all `1`s (ones), and all the other elements are all `0`s (zeroes).
Uma *matriz identidade* é uma matriz quadrada de tamanho \\( n \\times n \\), onde os elementos diagonais são todos `1` (um) e todos os outros elementos são `0`(zero).
<ul>
<li style='list-style: none;'>\(\displaystyle I_{n}=\begin{bmatrix} 1 &#x26; 0 &#x26; 0 \cr 0 &#x26; 1 &#x26; 0 \cr 0 &#x26; 0 &#x26; 1 \cr \end{bmatrix}\)</li>
@ -16,41 +16,41 @@ An *identity matrix* is a square matrix of size \\( n \\times n \\), where the d
# --instructions--
Write a function that takes a number `n` as a parameter and returns the identity matrix of order \\( n \\times n \\).
Escreva uma função que recebe um número `n` como um parâmetro e retorna a matriz identidade de ordem \\( n \\times n \\).
# --hints--
`idMatrix` should be a function.
`idMatrix` deve ser uma função.
```js
assert(typeof idMatrix == 'function');
```
`idMatrix(1)` should return an array.
`idMatrix(1)` deve retornar um array.
```js
assert(Array.isArray(idMatrix(1)));
```
`idMatrix(1)` should return `[ [ 1 ] ]`.
`idMatrix(1)` deve retornar `[ [ 1 ] ]`.
```js
assert.deepEqual(idMatrix(1), results[0]);
```
`idMatrix(2)` should return `[ [ 1, 0 ], [ 0, 1 ] ]`.
`idMatrix(2)` deve retornar `[ [ 1, 0 ], [ 0, 1 ] ]`.
```js
assert.deepEqual(idMatrix(2), results[1]);
```
`idMatrix(3)` should return `[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ]`.
`idMatrix(3)` deve retornar `[ [ 1, 0, 0 ], [ 0, 1, 0 ], [ 0, 0, 1 ] ]`.
```js
assert.deepEqual(idMatrix(3), results[2]);
```
`idMatrix(4)` should return `[ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]`.
`idMatrix(4)` deve retornar `[ [ 1, 0, 0, 0 ], [ 0, 1, 0, 0 ], [ 0, 0, 1, 0 ], [ 0, 0, 0, 1 ] ]`.
```js
assert.deepEqual(idMatrix(4), results[3]);