Search Header Logo

bài 23. 1 số lệnh làm việc với dữ liệu dsach

Authored by Vũ Hân

Information Technology (IT)

Professional Development

Used 4+ times

bài 23. 1 số lệnh làm việc với dữ liệu dsach
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Để xóa tất cả các phần tử trong danh sách ta dùng hàm gì?

append()

pop()

clear()

remove()

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Muốn xóa một phần tử từ danh sách ta dùng lệnh gì?

remove()

insert()

append()

clear()

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Sau khi thực hiện các câu lệnh sau, mảng A như thế nào?

>>> A = [1, 2, 3, 4, 5]

>>> A.remove(2)

>>> print(A)

[1, 2, 3, 4]

[2, 3, 4, 5]

[1, 2, 4, 5]

[1, 3, 4, 5]

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Phần tử có chỉ số bao nhiêu trong mảng A bị xoá?

>>> A = [10, 20, 3, 30, 20, 30, 20, 6, 3, 2, 8, 9]

>>> A.remove(3)

>>> print(A)

2

3

8

4

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Muốn xóa phần tử có chỉ số 2 trong danh sách a ta dùng lệnh gì?

del(2)

del a[2]

del a

remove(2)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Danh sách A trước và sau lệnh insert() là [1, 3, 5, 0] và [1, 3, 4, 5, 0]. Lệnh đã dùng là lệnh gì?

insert(2, 4)

insert(4, 2)

insert(3, 4)

insert(4, 3)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Muốn gọi đến phần tử đầu tiên trong danh sách a ta dùng lệnh gì?

a.[1]

a[0]

a.0

a[]

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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?