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

Test

On line Test- Tuples and Dictionary

Aparna Dhirde 15 preguntas

Hacer el test

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

Preguntas del test (15)

  1. 1Slicing is used to extract a part of the tuple
    1. AVerdadero
    2. BFalso
  2. 2Each key is separated from its value by a colon
    1. AVerdadero
    2. BFalso
  3. 3Keys are unique and act as the index
    1. AVerdadero
    2. BFalso
  4. 4Keys are of mutable type but values can be immutable
    1. AVerdadero
    2. BFalso
  5. 5Elements of tuple is enclosed in square brackets
    1. AVerdadero
    2. BFalso
  6. 6What will be the output of the following Python code?
    >>>t=(1,2,4,3)
    >>>t[1:-1]
    1. A(1, 2)
    2. B(1, 2, 4)
    3. C(2,4)
    4. D(2, 4, 3)
  7. 7What will be the output of the following Python code?
    >>>t = (1, 2, 4, 3, 8, 9)
    >>>[t[i] for i in range(0, len(t), 2)]
    1. A[2, 3, 9]
    2. B[1, 2, 4, 3, 8, 9]
    3. C[1,4,8]
    4. D(1, 4, 8)
  8. 8What will be the output of the following Python code?
    >>>t = (1, 2)
    >>>2 * t
    1. A[1, 2, 1, 2]
    2. B(1, 1, 2, 2)
    3. C[1, 1, 2, 2]
    4. D(1,2,1,2)
  9. 9What will be the output of the following Python code?
    >>>t1 = (1, 2, 4, 3)
    >>>t2 = (1, 2, 3, 4)
    >>>t1 < t2
    1. ATrue
    2. BFalse
    3. Cerror
    4. Dnone
  10. 10Which of the following statements create a dictionary?
    1. Ad = {}
    2. Bd = {“john”:40, “peter”:45}
    3. Cd = {40:”john”, 45:”peter”}
    4. DAll of the above

Información

Descripción
Test sobre On line Test- Tuples and Dictionary, creado por Aparna Dhirde el 18/03/2020.
Idioma
English
Visitas
122
Etiquetas
xi
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Más sobre Python Lists and Data Structures

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?