Search Header Logo

Kiểu Dữ Liệu Danh Sách trong Python

Authored by Thắng Vũ

Computers

12th Grade

Used 3+ times

Kiểu Dữ Liệu Danh Sách trong Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

OPEN ENDED QUESTION

3 mins • 1 pt

Khởi tạo dữ liệu danh sách như thế nào? Cách truy cập, thay đổi giá trị và xóa một phần tử trong danh sách như thế nào?

Evaluate responses using AI:

OFF

2.

OPEN ENDED QUESTION

3 mins • 1 pt

Có thể truy cập từng phần tử của danh sách thông qua chỉ số. Chỉ số của list đánh số từ 0. Khởi tạo kiểu dữ liệu danh sách trong Python: = [, ,..., ]

Evaluate responses using AI:

OFF

3.

OPEN ENDED QUESTION

3 mins • 1 pt

Ví dụ 2. Quan sát các lệnh sau để biết cách thay đổi hoặc xoá phần tử của danh sách

Evaluate responses using AI:

OFF

4.

OPEN ENDED QUESTION

3 mins • 1 pt

Ví dụ 3. Quan sát các lệnh sau để biết cách tạo danh sách rỗng (có độ dài 0) và các phép toán ghép danh sách (phép +).

Evaluate responses using AI:

OFF

5.

OPEN ENDED QUESTION

3 mins • 1 pt

Cho danh sách A = [1, 0, “One”, 9, 15, “Two”, True, False]. Hãy cho biết giá trị các phần tử: a) A[0] b) A[2] c) A[7] d) A[len(A)]

Evaluate responses using AI:

OFF

6.

OPEN ENDED QUESTION

3 mins • 1 pt

Giả sử A là một danh sách các số, mỗi lệnh sau thực hiện gì? a) A = A + [10] b) del (A[0]) c) A = [100] + A d) A = A[1] *25

Evaluate responses using AI:

OFF

7.

OPEN ENDED QUESTION

3 mins • 1 pt

Giải thích các lệnh ở mỗi câu sau thực hiện công việc gì? a) >>> S = 0 >>> for i in range(len(A)): if A[i] > 0: S = S + A[i] >>> print(S) b) >>> C = 0 >>> for i in range(len(A)): if A[i] > 0: C = C + 1 >>> print(C)

Evaluate responses using AI:

OFF

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?

Discover more resources for Computers