Search Header Logo

Quiz: Vectors (Lists) in Python - Easy Level

Authored by Marcelo Carlos

Information Technology (IT)

University

Quiz: Vectors (Lists) in Python - Easy Level
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

18 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das opções cria corretamente uma lista em Python?

lista = (1, 2, 3)

lista = {1, 2, 3}

lista = [1, 2, 3]

lista = <1, 2, 3>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você adiciona o número 5 ao final da lista numeros?

numeros.add(5)

numeros.append(5)

numeros.put(5)

numeros.insert()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual comando acessa o terceiro elemento da lista valores?

valores[3]

valores[2]

valores(3)

valores{2}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Como você remove o número 10 da lista numeros (assumindo que ele exista)?

numeros.delete(10)

numeros.remove(10)

numeros.pop(10)

numeros.discard(10)

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que `len(lista)` retorna?

O último elemento

A soma dos elementos

O número de elementos

Um erro

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

O que `lista = [1, 2] * 3` cria?

[1, 2, 3]

[3, 6]

[1, 2, 1, 2, 1, 2]

Erro

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das opções copia uma lista sem referenciar o mesmo objeto?

nova = lista

nova = lista.copy()

nova = lista

nova = lista.append()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?