Search Header Logo

Quiz de Funções em p5.js

Authored by JOAO MONTEIRO

Computers

10th Grade

Used 1+ times

Quiz de Funções em p5.js
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a principal função do bloco `setup()` em um projeto p5.js?

Desenhar formas geométricas continuamente na tela.

Configurar o ambiente inicial, como tamanho da tela e variáveis.

Detectar interações do teclado.

Repetir comandos indefinidamente.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que a função `draw()` faz em um sketch p5.js?

Executa comandos apenas uma vez no início.

Desenha formas geométricas apenas quando o usuário clica.

Executa comandos continuamente, criando animações.

Salva o desenho em um arquivo.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual comando é utilizado para desenhar um círculo em p5.js?

`rect(x, y, w, h)`

`ellipse(x, y, w, h)`

`line(x1, y1, x2, y2)`

`triangle(x1, y1, x2, y2, x3, y3)`

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

`rect(50, 50, 100, 100)`

`ellipse(50, 50, 100, 100)`

`rect(100, 100, 50, 50)`

`triangle(50, 50, 100, 100, 150, 150)`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das alternativas abaixo representa corretamente uma estrutura de repetição FOR em JavaScript?

`for (let i = 0; i < 10; i++) { /* comandos */ }`

`if (i < 10) { /* comandos */ }`

`while (i < 10) { /* comandos */ }`

`repeat (i = 0; i < 10; i++) { /* comandos */ }`

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

`if x > 100 { /* comandos */ }`

`if (x > 100) { /* comandos */ }`

`if x = 100 { /* comandos */ }`

`if (x < 100) { /* comandos */ }`

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você pode detectar se a tecla "espaço" foi pressionada em p5.js?

`if (key == ' ') { /* comandos */ }`

`if (mousePressed) { /* comandos */ }`

`if (keyCode == ENTER) { /* comandos */ }`

`if (key == 'a') { /* comandos */ }`

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?