O GoConqr está de visual novo! Conte para nós o que você achou.

Quiz

Tuples in Python

PathaPadha Support 12 perguntas

Fazer o quiz

Este quiz tem tempo limite, por isso abre no player de sempre.

Perguntas do quiz (12)

  1. 1What is the output of the following ?

    tuple1 = (1120, 'a')
    print(max(tuple1))
    1. ATypeError
    2. B1120
    3. C‘a’
  2. 2What is the output of the following tuple operation ?

    aTuple = (100,)
    print(aTuple * 2)
    1. ATypeError
    2. B(100, 100)
    3. C(200)
  3. 3Select true statements regarding the Python tuple
    1. AWe can remove the item from tuple but we cannot update items of the tuple
    2. BWe cannot delete the tuple
    3. CWe cannot remove the items from the tuple
    4. DWe cannot update items of the tuple.
  4. 4What is the output of the following tuple operation ?

    aTuple = (100, 200, 300, 400, 500)
    aTuple.pop(2)
    print(aTuple)
    1. A(100, 200, 400, 500)
    2. B(100, 300, 400, 500)
    3. CAttributeError
  5. 5Select which is true for Python tuple
    1. AA tuple maintains the order of items
    2. BWe can change the tuple once created
    3. CWe cannot change the tuple once created
    4. DA tuple is unordered
  6. 6A Python tuple can also be created without using parentheses
    1. AVerdadeiro
    2. BFalso
  7. 7Choose the correct way to access value 20 from the following tuple

    aTuple = ("Orange", [10, 20, 30], (5, 15, 25))
    1. AaTuple[1:2][1]
    2. BaTuple[1:2](1)
    3. CaTuple[1:2][0]
    4. DaTuple[1][1]
  8. 8What is the output of the following code ?

    aTuple = (100, 200, 300, 400, 500)
    aTuple[1] = 800
    print(aTuple)
    1. ATypeError
    2. B(100, 800, 200, 300, 400, 500)
    3. C(800, 100, 200, 300, 400, 500)
  9. 9What is the output of the following ?

    aTuple = (10, 20, 30, 40, 50, 60, 70, 80)
    print(aTuple[2:5], aTuple[:4], aTuple[3:])
    1. A(30, 40, 50) (10, 20, 30, 40) (40, 50, 60, 70, 80)
    2. B(20, 30, 40, 50) (10, 20, 30, 40) (30, 40, 50, 60, 70, 80)
    3. C(30, 40, 50) (10, 20, 30, 40) (40, 50, 60, 70)
    4. D(30, 40, 50) (10, 20, 30) (40, 50, 60, 70, 80)
  10. 10What is the type of the following variable ?

    aTuple = ("Orange")
    print(type(aTuple))
    1. Alist
    2. Btuple
    3. Carray
    4. Dstr

Informações

Descrição
Coding Python Quiz sobre Tuples in Python, criado por PathaPadha Support em 27-10-2020.
Idioma
English
Visualizações
405
Etiquetas
pythoncoding
Avaliação
Ainda sem avaliações
Avalie este quiz
Avalie este quiz

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?