Funções e Variáveis

Quiz
•
Instructional Technology
•
12th Grade
•
Hard
Ryan Castro
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída da função abaixo quando chamada com o argumento 5? ```python def f(x): return x * 2 print(f(5)) ```
10
5
25
2
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é o valor da variável `y` após a execução do código abaixo? ```python def add(a, b): return a + b y = add(3, 4) ```
3
4
7
12
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O que a função `square` retorna quando chamada com o argumento 3? ```python def square(n): return n ** 2 print(square(3)) ```
6
9
3
27
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código? ```python def multiply(a, b): return a * b result = multiply(2, 3) print(result) ```
5
6
8
9
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
O que a função `subtract` retorna quando chamada com os argumentos 10 e 4? ```python def subtract(a, b): return a - b print(subtract(10, 4)) ```
6
14
4
-6
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é a saída do seguinte código? ```python def divide(a, b): return a / b result = divide(8, 2) print(result) ```
4.0
4
2
16
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual é o valor da variável `z` após a execução do código abaixo? ```python def mod(a, b): return a % b z = mod(10, 3) ```
1
3
7
10
Create a free account and access millions of resources
Similar Resources on Wayground
6 questions
Diagnósticos sobre C++ noveno

Quiz
•
8th Grade - University
10 questions
Novelas Brasileiras

Quiz
•
9th - 12th Grade
14 questions
Python Functions and Returns

Quiz
•
9th - 12th Grade
15 questions
Python Internship Quiz

Quiz
•
12th Grade - University
10 questions
Python repaso

Quiz
•
9th - 12th Grade
10 questions
B26.1-Tin10

Quiz
•
12th Grade
10 questions
B28.3-Tin10

Quiz
•
12th Grade
7 questions
File Handling Text Files

Quiz
•
12th Grade - University
Popular Resources on Wayground
55 questions
CHS Student Handbook 25-26

Quiz
•
9th Grade
10 questions
Afterschool Activities & Sports

Quiz
•
6th - 8th Grade
15 questions
PRIDE

Quiz
•
6th - 8th Grade
15 questions
Cool Tool:Chromebook

Quiz
•
6th - 8th Grade
10 questions
Lab Safety Procedures and Guidelines

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

Quiz
•
3rd Grade
20 questions
Bullying

Quiz
•
7th Grade
18 questions
7SS - 30a - Budgeting

Quiz
•
6th - 8th Grade