Multiple Choice Questions -Lists

Descrição

Quiz sobre Multiple Choice Questions -Lists, criado por Aparna Dhirde em 17-03-2020.
Aparna Dhirde
Quiz por Aparna Dhirde, atualizado more than 1 year ago
Aparna Dhirde
Criado por Aparna Dhirde mais de 4 anos atrás
71
0

Resumo de Recurso

Questão 1

Questão
What is the output when we execute list(“hello”)?
Responda
  • [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]
  • [‘hello’]
  • [‘llo’]
  • [‘olleh’]

Questão 2

Questão
Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?
Responda
  • 5
  • 4
  • none
  • error

Questão 3

Questão
Suppose list1 is [2445,133,12454,123], what is max(list1)?
Responda
  • 2445
  • 133
  • 12454
  • 123

Questão 4

Questão
Suppose list1 is [1, 5, 9], what is sum(list1)?
Responda
  • 1
  • 9
  • 15
  • error

Questão 5

Questão
Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
Responda
  • error
  • none
  • 25
  • 2

Questão 6

Questão
To add a new element to a list we use which command?
Responda
  • list1.add(5)
  • list1.append(5)
  • list1.addLast(5)
  • list1.addEnd(5)

Questão 7

Questão
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
Responda
  • [3, 4, 5, 20, 5, 25, 1, 3]
  • [1, 3, 3, 4, 5, 5, 20, 25]
  • [25, 20, 5, 5, 4, 3, 3, 1]
  • [3, 1, 25, 5, 20, 5, 4, 3]

Questão 8

Questão
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?
Responda
  • [3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
  • [1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
  • [25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
  • [1, 3, 4, 5, 20, 5, 25, 3, 34, 5]

Questão 9

Questão
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
Responda
  • [3, 4, 5, 20, 5, 25, 1, 3]
  • [1, 3, 3, 4, 5, 5, 20, 25]
  • [3, 5, 20, 5, 25, 1, 3]
  • [1, 3, 4, 5, 20, 5, 25]

Questão 10

Questão
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?
Responda
  • [3, 4, 5, 20, 5, 25, 1]
  • [1, 3, 3, 4, 5, 5, 20, 25]
  • [3, 5, 20, 5, 25, 1, 3]
  • [1, 3, 4, 5, 20, 5, 25]

Questão 11

Questão
What will be the output of the following Python code? >>>list("a#b#c#d".split('#'))
Responda
  • [‘a’, ‘b’, ‘c’, ‘d’]
  • [‘a b c d’]
  • [‘a#b#c#d’]
  • [‘abcd’]

Questão 12

Questão
What will be the output of the following Python code? list1 = [1, 2, 3, 4] list2 = [5, 6, 7, 8] print(len(list1 + list2))
Responda
  • 2
  • 4
  • 5
  • 8

Questão 13

Questão
To which of the following the “in” operator can be used to check if an item is in it?
Responda
  • Lists
  • Dictionary
  • Set
  • All of the mentioned

Semelhante

Revisão Para o ENEM em 20 dias
Alessandra S.
Cinemática Escalar: Conceitos fundamentais
Bruno Fernandes3682
Quiz de Geografia
Alessandra S.
Princípios da Química
GoConqr suporte .
Direito Constitucional Esquematizado - Pedro Lenza - Capítulo 3
Anaximandro Martins Leão
Regras de acentuação das palavras
Vitor Coelho de
Plano de estudos em três etapas
GoConqr suporte .
TCC - ELABORAÇÃO DE PARÁGRAFOS
dtybel
HISTÓRIA DO BRASIL COLONIAL (1ª PARTE)
Lucas Villar
Contextualização Aula 02 - Desenvolvimento e Sustentabilidade Ambiental - Medicina
Jéssica Meireles
Reinos Biológicos
Hudson Breno