Search Header Logo

CỦNG CỐ BÀI 22: KIỂU DỮ LIỆU DANH SÁCH

Authored by Thanh Đào

Other

10th Grade

CỦNG CỐ BÀI 22: KIỂU DỮ LIỆU DANH SÁCH
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong Python, danh sách (list) được khai báo bằng ký hiệu nào?

{}

[]

()

<>

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Phương thức nào sau đây dùng để thêm phần tử vào list trong python?

append()

abs()

link()

del()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh xoá một phần tử của một danh sách A có chỉ số i là:

list.del(i)

A.del(i)

A.del[i]

del A[i]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cho danh sách: fruits = ["apple", "banana", "cherry"]. Lệnh nào sau đây in ra “banana”?

print(fruits[2])

print(fruits[-3])

print(fruits[1])

print(fruits[3])

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Dùng lệnh nào để có thể duyệt lần lượt các phần tử của danh sách?

Dùng lệnh for.

Lệnh append()

Lệnh for kết hợp với vùng giá trị của lệnh range().

Lệnh len()

6.

FILL IN THE BLANKS QUESTION

30 sec • 1 pt

Điền vào chỗ trống để hoàn thành đoạn chương trình sau:

fruits = ["apple", "banana", "cherry"]

fruits. (a)   ("orange")

print(fruits)

(Điền phương thức thích hợp để thêm orange vào danh sách)

7.

FILL IN THE BLANKS QUESTION

30 sec • 1 pt

Điền vào chỗ trống để hoàn thành đoạn chương trình sau:

animals = ["cat", "dog", "rabbit"]

(a)   animals(1)

print(animals)

(Điền phương thức thích hợp để xóa phần tử có chỉ số 1)

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?