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") ```

Desafio de Python: Condições e Strings

Quiz
•
Computers
•
2nd Grade
•
Medium

Gabriel Lobo
Used 2+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
Similar Resources on Wayground
10 questions
PYTHON (FOR LOOP)

Quiz
•
1st - 10th Grade
10 questions
9-сынып. Python массив.

Quiz
•
1st - 9th Grade
14 questions
Python-basics

Quiz
•
1st - 4th Grade
10 questions
Sistemas Operacionais 30/08/19

Quiz
•
1st Grade - University
10 questions
Python Math

Quiz
•
1st - 12th Grade
15 questions
Quiz de Programação em Python

Quiz
•
2nd Grade
20 questions
Informatica Básica

Quiz
•
1st - 10th Grade
18 questions
Python - Основы

Quiz
•
1st - 4th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade