Understanding Lists and Tuples in Python

Understanding Lists and Tuples in Python

12th Grade

10 Qs

quiz-placeholder

Similar activities

RECUPERAÇÃO DE PENSAMENTO COMPUTACIONAL

RECUPERAÇÃO DE PENSAMENTO COMPUTACIONAL

8th Grade - University

10 Qs

3 AP - PDS

3 AP - PDS

12th Grade

8 Qs

Listas en Python

Listas en Python

12th Grade

15 Qs

Recuperação Trimestral

Recuperação Trimestral

8th Grade - University

10 Qs

Curso Básico de Python

Curso Básico de Python

12th Grade

10 Qs

Programação e Algoritmos

Programação e Algoritmos

6th Grade - University

6 Qs

Listas, Tuplas y Diccionarios

Listas, Tuplas y Diccionarios

12th Grade - University

15 Qs

Python

Python

1st - 12th Grade

10 Qs

Understanding Lists and Tuples in Python

Understanding Lists and Tuples in Python

Assessment

Quiz

Computers

12th Grade

Medium

Created by

BRUNA KWIATKOVSKI

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das seguintes afirmações descreve corretamente uma diferença entre listas e tuplas em Python?

Listas são imutáveis, enquanto tuplas são mutáveis.

Listas são mutáveis, enquanto tuplas são imutáveis.

Tanto listas quanto tuplas são imutáveis.

Tanto listas quanto tuplas são mutáveis.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a forma correta de criar uma tupla contendo um único elemento, o número inteiro 5?

(5)

[5]

(5,)

5,

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dada a lista L = [1, 2, 3, 4], qual é o resultado de L[1:3]?

[1, 2, 3]

[2, 3]

[2, 3, 4]

[1, 2]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual dos seguintes métodos pode ser usado para adicionar um elemento ao final de uma lista em Python?

append()

add()

insert()

extend()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual será a saída do seguinte código? t = (1, 2, 3) t[1] = 4 print(t)

(1, 4, 3)

(1, 2, 3)

Erro

[1, 4, 3]

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual das seguintes é uma forma válida de concatenar duas listas A = [1, 2] e B = [3, 4]?

A + B

A × B

A · B

A & B

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Qual é a saída do seguinte código? x = [1, 2, 3] y = x y[0] = 10 print(x)

[1, 2, 3]

[10, 2, 3]

[1, 10, 3]

[10, 1, 2, 3]

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?