Desafio de Python: Condições e Strings

Desafio de Python: Condições e Strings

2nd Grade

15 Qs

quiz-placeholder

Similar activities

Python тілінде программалау

Python тілінде программалау

1st - 10th Grade

10 Qs

Revisão MIcro:bit

Revisão MIcro:bit

1st - 5th Grade

10 Qs

JavaScrip - DSI

JavaScrip - DSI

1st Grade - University

14 Qs

Senac - 2° ano - Atividade 2 - 2° trimestre

Senac - 2° ano - Atividade 2 - 2° trimestre

2nd Grade

10 Qs

Python_2R

Python_2R

KG - Professional Development

20 Qs

Python Basics

Python Basics

KG - University

16 Qs

Python basics

Python basics

2nd - 9th Grade

20 Qs

Python Basics

Python Basics

KG - University

15 Qs

Desafio de Python: Condições e Strings

Desafio de Python: Condições e Strings

Assessment

Quiz

Computers

2nd Grade

Medium

Created by

Gabriel Lobo

Used 2+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código Python? ```python x = 10 if x > 5: print("Maior que 5") else: print("Menor ou igual a 5") ```

Menor ou igual a 5

Maior que 5

Nenhuma das anteriores

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que acontece quando o seguinte código é executado? ```python try: print(10 / 0) except ZeroDivisionError: print("Erro de divisão por zero") ```

O programa para com um erro

Imprime "Erro de divisão por zero"

Imprime "10 / 0"

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? ```python s = "Python" print(s[0:3]) ```

Pyt

hon

Pyth

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? ```python x = 5 y = 10 if x < y and y > 5: print("Condição verdadeira") else: print("Condição falsa") ```

Condição verdadeira

Condição falsa

Nenhuma das anteriores

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? ```python try: int("abc") except ValueError: print("Erro de valor") ```

Erro de valor

abc

Nenhuma saída

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? ```python s = "Olá, Mundo!" print(s.upper()) ```

olá, mundo!

OLÁ, MUNDO!

Olá, Mundo!

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? ```python x = "123" if isinstance(x, str): print("É uma string") else: print("Não é uma string") ```

É uma string

Não é uma string

Nenhuma das anteriores

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?