Diccionarios - Python
Quiz
•
Computers
•
University
•
Practice Problem
•
Medium
Ailén Pestaña
Used 4+ times
FREE Resource
Enhance your content in a minute
8 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qué ventaja tiene un diccionario sobre una lista en cuanto a la búsqueda de elementos?
Ocupan menos memoria.
Pueden contener más elementos que las listas.
Permiten acceder a elementos por contenido, no por posición.
No permiten agregar nuevos elementos.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qué tipos de datos pueden utilizarse como claves en un diccionario?
Solo números enteros.
Solo strings.
Cualquier tipo de dato, siempre que sea mutable.
Cualquier tipo de dato, siempre que no permita cambios.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Si yo tengo en Python:
d = {“Primero”: Argentina,
“Segundo”:Francia,
“Tercero”: Croacia,
“Cuarto”: Marruecos,}
Cómo puedo acceder al valor de la primera posición?
d[0]
d[1]
d[“Argentina”]
d[“Primero”]
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cuál de los siguientes métodos se utiliza para eliminar todos los elementos de un diccionario llamado “d”?
d.remove()
d.delete()
d.clear()
d.empty()
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qué método devuelve una lista con todas las claves de un diccionario llamado “d”?
d.list()
d.keys()
d.get_keys()
Ninguna de las anteriores
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Qué ocurre si intentamos acceder a una clave que no existe en un diccionario?
Se agrega automáticamente con un valor vacío.
Se añade la clave con el valor “None”
Se devuelve un error de "KetNotFound".
Se crea una nueva entrada con la clave especificada.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Si yo tengo en Python:
Si yo tengo en Python:
d = { “Primero”: Argentina,
“Segundo”:Francia,
“Tercero”: Croacia,
“Cuarto”: Marruecos,}
Y le quiero agregar la clave “Quinto” con valor “Brasil”, como harían?
d.insert(clave, valor)
d.append(clave, valor)
d[clave] = valor
d.add(clave, valor)
Access all questions and much more by creating a free account
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
Already have an account?
Similar Resources on Wayground
10 questions
INTRODUCCION A LA PROGRAMACION
Quiz
•
6th Grade - University
10 questions
Entorno Financiero Digital 2do test
Quiz
•
University
11 questions
Herramientas WEB
Quiz
•
6th Grade - Professio...
10 questions
Microsoft Excel
Quiz
•
University
10 questions
Google Apps
Quiz
•
10th Grade - Professi...
10 questions
A level Computer Science In-fix post-fix Reverse polish
Quiz
•
10th Grade - University
10 questions
T02: Python - The Basics
Quiz
•
University
10 questions
Explorando Tinkercad en Secundaria
Quiz
•
7th Grade - University
Popular Resources on Wayground
8 questions
2 Step Word Problems
Quiz
•
KG - University
20 questions
Comparing Fractions
Quiz
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Latin Bases claus(clois,clos, clud, clus) and ped
Quiz
•
6th - 8th Grade
22 questions
fractions
Quiz
•
3rd Grade
7 questions
The Story of Books
Quiz
•
6th - 8th Grade
Discover more resources for Computers
8 questions
2 Step Word Problems
Quiz
•
KG - University
7 questions
Comparing Fractions
Interactive video
•
1st Grade - University
7 questions
Force and Motion
Interactive video
•
4th Grade - University
10 questions
14.2 Independent/Dependent Variables
Quiz
•
KG - University
18 questions
Great Lakes States
Quiz
•
KG - University
7 questions
DNA, Chromosomes, Genes, and Traits: An Intro to Heredity
Interactive video
•
11th Grade - University
7 questions
Reflexive Verbs in Spanish
Lesson
•
9th Grade - University
7 questions
Narrative Writing 1
Interactive video
•
4th Grade - University
