Search Header Logo

Kiểm tra Danh sách, Xâu trong Python

Authored by TaQuang Dat

Computers

11th Grade

Used 16+ times

Kiểm tra Danh sách, Xâu 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.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Đâu là cách khai báo một danh sách đúng? (Có thể chọn nhiều đáp án)

D = []

D = {"a", 4, 9}

D = [7, 6, 9, " "]

D = ['Hello', '3456']

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Cho danh sách: DS = [4, 8, 12, 5, 9, 3, -2, -7]

Sau khi thực hiện lệnh: print( DS[:3]) màn hình sẽ xuất hiện thông tin nào dưới đây?

5

3

[4, 8, 12, 5]

Báo lỗi

3.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Danh sách là một ___ các phần tử có thể có kiểu dữ liệu giống hoặc khác nhau:

4.

MULTIPLE SELECT QUESTION

1 min • 1 pt

Chọn các xâu bạn cho là hợp lệ:

8534

("4 + 10")

'Forever'

"1,2,3,4"

Happy birthday

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Cho câu lệnh sau:

for x in "banana"

print(x)

Đâu tìm lỗi sai trong câu lệnh trên

print(x) sai cú pháp

dùng sai từ khóa in

lệnh print(x) không lùi dòng

thiếu dấu ":" sau "banana"

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Cho xâu H = "Never Give Up"

print(len(H))

Bạn hãy cho biết lệnh trên trả về kết quả nào dưới đây?

12

13

14

15

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

Cho danh sách fruits = ["apple", "bananas", "mangoes", "cherries"]

Đâu là phần còn thiếu của lệnh duyệt qua các phần tử trong một danh sách?

for x in ___:

print(x)

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?