Quiz sobre Condicionais e Repetições

Quiz sobre Condicionais e Repetições

10th Grade

30 Qs

quiz-placeholder

Similar activities

CS 1 Cycle 3 exam

CS 1 Cycle 3 exam

9th Grade - University

30 Qs

Functions in JavaScript

Functions in JavaScript

9th - 12th Grade

33 Qs

revision

revision

8th Grade - University

25 Qs

Intro to CS Unit 2

Intro to CS Unit 2

10th - 11th Grade

27 Qs

CSP Python Review

CSP Python Review

9th - 12th Grade

25 Qs

Python Test

Python Test

9th - 12th Grade

25 Qs

2.2 j277 computer science programming techniques (iteration)

2.2 j277 computer science programming techniques (iteration)

9th - 10th Grade

30 Qs

Roblox Lanjutan (Bag. 7.1)

Roblox Lanjutan (Bag. 7.1)

9th Grade - University

35 Qs

Quiz sobre Condicionais e Repetições

Quiz sobre Condicionais e Repetições

Assessment

Quiz

Computers

10th Grade

Easy

Used 1+ times

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das alternativas abaixo representa corretamente a estrutura básica de um laço while em Python?

`while (condição) { ... }`

`while condição: ...`

`enquanto condição faça ...`

`loop enquanto condição ...`

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que acontece se a condição do laço while nunca for falsa?

O laço executa apenas uma vez.

O laço nunca executa.

O laço executa infinitamente.

O laço executa duas vezes.

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Considere o seguinte código: ```python x = 0 while x < 3: x += 1 print(x) ``` Qual será o valor impresso?

0

2

3

4

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das opções abaixo representa uma condição aninhada dentro de um laço while?

`if x > 0:`

`while x > 0: if y < 5: ...`

`for i in range(5):`

`print(x)`

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que o seguinte código faz? ```python n = 5 while n > 0: if n % 2 == 0: print(n) n -= 1 ```

Imprime todos os números de 1 a 5.

Imprime apenas os números ímpares de 5 a 1.

Imprime apenas os números pares de 5 a 1.

Não imprime nada.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? ```python x = 1 while x < 4: if x == 2: print("Dois") x += 1 ```

Dois

1 2 3

2

Dois Dois Dois

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das alternativas abaixo representa corretamente uma estrutura de repetição com condição aninhada?

`while x > 0: print(x)`

`while x > 0: if x % 2 == 0: print(x)`

`if x > 0: while x < 10: print(x)`

`print(x)`

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?