Understanding Lists and Tuples in Python

Understanding Lists and Tuples in Python

12th Grade

10 Qs

quiz-placeholder

Similar activities

Tin 8/1

Tin 8/1

KG - University

10 Qs

ZOOM QUIZ

ZOOM QUIZ

1st - 12th Grade

10 Qs

1ª Recuperação - 3° Trim. - Pensamento Computacional - 9º ano

1ª Recuperação - 3° Trim. - Pensamento Computacional - 9º ano

9th Grade - University

10 Qs

Diagnostico tecnología 1°

Diagnostico tecnología 1°

1st - 12th Grade

11 Qs

Tin học 10 _ Bài 16 _Định dạng văn bản

Tin học 10 _ Bài 16 _Định dạng văn bản

10th - 12th Grade

10 Qs

Quis Grade 5

Quis Grade 5

9th - 12th Grade

15 Qs

Bài 10-Thực hành khai thác tài nguyên trên Internet

Bài 10-Thực hành khai thác tài nguyên trên Internet

10th - 12th Grade

10 Qs

Microcontroller

Microcontroller

11th Grade - University

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]

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?