Understanding Lists and Tuples in Python

Understanding Lists and Tuples in Python

12th Grade

10 Qs

quiz-placeholder

Similar activities

Grupi II_mesimi online

Grupi II_mesimi online

12th Grade

10 Qs

G7 - Ôn tập C1,2

G7 - Ôn tập C1,2

KG - University

10 Qs

PREGUNTAS BÁSICAS SOBRE CONOCIMIENTO INFORMÁTICO

PREGUNTAS BÁSICAS SOBRE CONOCIMIENTO INFORMÁTICO

1st Grade - Professional Development

10 Qs

Lógica Computacional - Teoria dos Conjuntos relações e operações

Lógica Computacional - Teoria dos Conjuntos relações e operações

12th Grade

10 Qs

TIN 9 BÀI 1,2

TIN 9 BÀI 1,2

1st - 12th Grade

15 Qs

Bài tập trắc nghiệm C++(tiếp)

Bài tập trắc nghiệm C++(tiếp)

3rd Grade - University

10 Qs

Java: repetition control structure for & while

Java: repetition control structure for & while

10th - 12th Grade

10 Qs

Trò chơi ôn tập Tin 12 lần 1

Trò chơi ôn tập Tin 12 lần 1

12th Grade

10 Qs

Understanding Lists and Tuples in Python

Understanding Lists and Tuples in Python

Assessment

Quiz

Computers

12th Grade

Practice Problem

Medium

Created by

BRUNA KWIATKOVSKI

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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

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?