Python Code IF

Quiz
•
Computers
•
University
•
Medium
Carlos Weber
Used 5+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual é a saída do seguinte código Python?
a = 5
b = 2
x = a * b
if x > 5:
print("Maior que 5")
else:
print("Menor ou igual a 5")
Maior que 5
Menor ou igual a 5
Erro de sintaxe
Nenhuma das anteriores
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
O que este código imprime?
a = 27
b = 9
y = a / b
if y > 3:
print("Maior que 3")
elif y == 3:
print("Igual a 3")
else:
print("Menor que 3")
Maior que 3
Igual a 3
Menor que 3
Nenhuma das anteriores
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual a saída do código abaixo?
a = 56
b = 8
z = a / b
if z % 2 == 0:
print("Par")
else:
print("Ímpar")
Par
Ímpar
Erro de sintaxe
Nenhuma das anteriores
4.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
O que o seguinte código fará?
x = 40
y = 5
a = 3 * y
b = x / 2
if a > b:
print("a é maior que b")
elif a == b:
print("a é igual a b")
else:
print("a é menor que b")
a é maior que b
a é igual a b
a é menor que b
Nenhuma das anteriores
5.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual é a saída do seguinte código?
a = 81
n = a / 9
if n % 3 == 0:
if n % 2 == 0:
print("Divisível por 3 e par")
else:
print("Divisível por 3 e ímpar")
else:
print("Não é divisível por 3")
Divisível por 3 e par
Divisível por 3 e ímpar
Não é divisível por 3
Nenhuma das anteriores
6.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual será o valor da variável resultado após a execução do código?
Considere o seguinte trecho de código: a = 3 b = 1
c = 4
x = a + b
y = a + c
if x > y:
resultado = x - y
elif x < y:
resultado = y - x
else:
resultado = x + y
print(resultado)
11
3
-7
28
7.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
Qual será a saída após a execução do código? Dado o código abaixo:
a = 10
b = 20
c = 30
if a > b and a > c:
maior = a
elif b > a and b > c:
maior = b
else:
maior = c
print(maior)
10
20
30
Nenhuma das anteriores
Create a free account and access millions of resources
Similar Resources on Wayground
12 questions
IP-Com3 - Clase 2

Quiz
•
University
10 questions
Dominando Bucles: For y While en Python 🐍

Quiz
•
University
13 questions
Cuestionario de Programación Avanzada

Quiz
•
University
9 questions
PWD_TP1_TP2_TP3

Quiz
•
University
6 questions
listas y ciclos

Quiz
•
University
10 questions
Programación Avanzada II - Parte 4

Quiz
•
University
10 questions
PYTHON PROGRAMMING

Quiz
•
University
15 questions
HCI 584 Python quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
SR&R 2025-2026 Practice Quiz

Quiz
•
6th - 8th Grade
30 questions
Review of Grade Level Rules WJH

Quiz
•
6th - 8th Grade
6 questions
PRIDE in the Hallways and Bathrooms

Lesson
•
12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
15 questions
Subtracting Integers

Quiz
•
7th Grade
Discover more resources for Computers
15 questions
Let's Take a Poll...

Quiz
•
9th Grade - University
2 questions
Pronouncing Names Correctly

Quiz
•
University
34 questions
WH - Unit 2 Exam Review -B

Quiz
•
10th Grade - University
21 questions
Mapa países hispanohablantes

Quiz
•
1st Grade - University
10 questions
Transition Words

Quiz
•
University
5 questions
Theme

Interactive video
•
4th Grade - University
25 questions
Identifying Parts of Speech

Quiz
•
8th Grade - University
10 questions
Spanish Greetings and Goodbyes!

Lesson
•
6th Grade - University