Search Header Logo

Câu hỏi về Mảng trong Python

Authored by Hoàng Nguyễn

Computers

11th Grade

Used 2+ times

Câu hỏi về Mảng trong Python
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

105 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mảng 1 chiều trong Python được khai báo như thế nào?

array = [1, 2, 3]

array = (1, 2, 3)

array = {1, 2, 3}

array = set(1, 2, 3)

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào sau đây để in phần tử đầu tiên của mảng arr = [10, 20, 30, 40]?

print(arr[1])

print(arr[0])

print(arr[2])

print(arr[4])

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào sau đây sẽ thay đổi phần tử thứ 2 của mảng arr = [10, 20, 30, 40] thành 50?

arr[2] = 50

arr(2) = 50

arr[1] = 50

arr[3] = 50

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Để lấy độ dài của mảng trong Python, lệnh nào sau đây là đúng?

len(arr)

size(arr)

length(arr)

arr.size()

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Mảng sau có bao nhiêu phần tử: arr = [1, 2, 3, 4, 5]?

5

6

4

3

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào sau đây dùng để thêm phần tử 10 vào cuối mảng arr = [1, 2, 3]?

arr.add(10)

arr.append(10)

arr.insert(10)

arr.append(10, 20)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Nếu mảng arr = [1, 2, 3], kết quả của lệnh arr[1:3] là gì?

[2, 3]

[1, 2]

[1, 3]

[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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

Already have an account?