Manipulação de Listas em Python
Quiz
•
Information Technology (IT)
•
Professional Development
•
Medium
CLEYTON PINHEIRO
Used 4+ times
FREE Resource
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Considere a lista `numeros = [2, 4, 6, 8, 10]`. Qual comando Python adiciona o número 12 ao final da lista?
numeros.add(12)
numeros.append(12)
numeros.insert(12)
numeros.push(12)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Associe o método da lista à sua função correta: 1. append() 2. remove() 3. sort() 4. pop() a) Remove o último elemento da lista b) Adiciona um elemento ao final da lista c) Ordena a lista d) Remove um elemento específico da lista
1-b, 2-d, 3-c, 4-a
1-c, 2-b, 3-d, 4-a
1-d, 2-a, 3-b, 4-c
1-a, 2-c, 3-b, 4-d
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Complete o código para que ele imprima todos os elementos da lista `frutas = ["maçã", "banana", "uva"]`: ```python for fruta in _______: print(fruta) ```
frutas
fruta
range(frutas)
enumerate(fruta)
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual das opções abaixo retorna uma nova lista com o quadrado de cada número da lista `numeros = [1, 2, 3, 4]` usando compreensão de listas?
[x*2 for x in numeros]
[x**2 for x in numeros]
[x+2 for x in numeros]
[x/2 for x in numeros]
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Dada a função abaixo, qual será a saída ao chamar `soma_lista([1, 2, 3])`? ```python def soma_lista(lista): soma = 0 for item in lista: soma += item return soma ```
5
6
7
3
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qual método remove e retorna o último elemento de uma lista em Python?
remove()
pop()
del()
clear()
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Combine cada função com o resultado correto ao ser aplicada na lista `letras = ['a', 'b', 'c']`: 1. letras.append('d') 2. letras.pop() 3. letras.remove('b') a) ['a', 'b', 'c', 'd'] b) ['a', 'b'] c) ['a', 'c']
1-a, 2-b, 3-c
1-b, 2-c, 3-a
1-c, 2-a, 3-b
1-a, 2-c, 3-b
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Diplomado Python
Quiz
•
Professional Development
10 questions
AUTOEVALUACIÓN DE ATAQUES A INFRAESTRUCTURAS DE SISTEMAS Y REDES
Quiz
•
Professional Development
10 questions
Ethical Hacking Kali Linux Part 3
Quiz
•
Professional Development
10 questions
ML 2
Quiz
•
Professional Development
10 questions
Beyond the brackets
Quiz
•
Professional Development
10 questions
ICE BREAKING
Quiz
•
Professional Development
20 questions
QUIZ SOBRE TECNOLOGIA
Quiz
•
Professional Development
12 questions
PrIncipais Tags HTML e Inputs HTML
Quiz
•
Professional Development
Popular Resources on Wayground
10 questions
Ice Breaker Trivia: Food from Around the World
Quiz
•
3rd - 12th Grade
20 questions
Halloween Trivia
Quiz
•
6th - 8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
4 questions
Activity set 10/24
Lesson
•
6th - 8th Grade
22 questions
Adding Integers
Quiz
•
6th Grade
10 questions
How to Email your Teacher
Quiz
•
Professional Development
15 questions
Order of Operations
Quiz
•
5th Grade
30 questions
October: Math Fluency: Multiply and Divide
Quiz
•
7th Grade
Discover more resources for Information Technology (IT)
10 questions
How to Email your Teacher
Quiz
•
Professional Development
11 questions
NFL Football logos
Quiz
•
KG - Professional Dev...
16 questions
Spooky Season Quiz
Quiz
•
Professional Development
10 questions
Halloween Trivia
Quiz
•
Professional Development
20 questions
Context Clues: Multiple Meaning Words
Quiz
•
Professional Development
18 questions
Do or Does
Quiz
•
Professional Development
31 questions
Servsafe Food Manager Practice Test 2021- Part 1
Quiz
•
9th Grade - Professio...
