¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Online Test List & Dictionary

Aparna Dhirde 20 preguntas

Hacer el test

Este test tiene tiempo límite, así que se abre en el reproductor de siempre.

Preguntas del test (20)

  1. 1Keys in dictionary are of mutable type but values can be immutable.
    1. AVerdadero
    2. BFalso
  2. 2List is enclosed in square brackets
    1. AVerdadero
    2. BFalso
  3. 3Slicing is used to extract a part of the list
    1. AVerdadero
    2. BFalso
  4. 4Each key is separated from its value by a colon.
    1. AVerdadero
    2. BFalso
  5. 5Keys are unique and act as the index.
    1. AVerdadero
    2. BFalso
  6. 6If a is a dictionary with some key-value pairs, what does a.popitem() do?
    1. ARemoves an arbitrary element
    2. BRemoves all the key-value pairs
    3. CRemoves the key-value pair for the key given as an argument
    4. DInvalid method for dictionary
  7. 7What will be the output of the following Python code snippet?
    >>> a={1:"A",2:"B",3:"C"}
    >>> del a
    1. Amethod del doesn’t exist for the dictionary
    2. Bdel deletes the values in the dictionary
    3. Cdel deletes the entire dictionary
    4. Ddel deletes the keys in the dictionary
  8. 8Which of the statements about dictionary values if false?
    1. AMore than one key can have the same value
    2. BThe values of the dictionary can be accessed as dict[key]
    3. CValues of a dictionary must be unique
    4. DValues of a dictionary can be a mixture of letters and numbers
  9. 9What will be the output of the following Python code snippet?
    a={1:"A",2:"B",3:"C"}
    print(a.get(5,4))
    1. AError, invalid syntax
    2. BA
    3. C5
    4. D4
  10. 10What will be the output of the following Python code snippet?
    a={1:"A",2:"B",3:"C"}
    print(a.get(1,4))
    1. A1
    2. BA
    3. C4
    4. DInvalid syntax for get method

Información

Descripción
Test sobre Online Test List & Dictionary, creado por Aparna Dhirde el 17/03/2020.
Idioma
English
Visitas
39
Etiquetas
xi
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?