Kiểu danh sách Python

Kiểu danh sách Python

10th Grade

10 Qs

quiz-placeholder

Similar activities

INTRODUCCION A LA PROGRAMACION

INTRODUCCION A LA PROGRAMACION

6th Grade - University

10 Qs

Wifi y bluetooth

Wifi y bluetooth

10th Grade

10 Qs

Review for Midterm Test ICT 3

Review for Midterm Test ICT 3

1st - 11th Grade

15 Qs

General Ict Quiz

General Ict Quiz

4th Grade - University

15 Qs

Threats to Data

Threats to Data

9th - 12th Grade

11 Qs

Chapter 7: System life cycle

Chapter 7: System life cycle

9th - 11th Grade

15 Qs

OCR GCSE CS - 2.1 ERL sorts and searches

OCR GCSE CS - 2.1 ERL sorts and searches

10th - 11th Grade

9 Qs

Excel 2016 perusteet

Excel 2016 perusteet

10th Grade

12 Qs

Kiểu danh sách Python

Kiểu danh sách Python

Assessment

Quiz

Computers

10th Grade

Practice Problem

Medium

Created by

thuy ngan

Used 6+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Câu 1. Để khai báo danh sách a và khởi tạo danh sách a có 3 phần tử 10, 20, 30, phương án nào sau đây đúng?

a = (10,20,30)

  1. a = {10,20,30}

  1. a = [10,20,30]

  1. a = 10,20,30

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Câu 2. Để khai báo danh sách a rỗng, phương án nào sau đây đúng?

  1. a ==[]

  1. a= 0

  1. a = []

  1. a = [0]

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu 3. Để xuất phần tử cuối cùng trong danh sách a, phương án nào sau đây đúng?

  1. print(a[len(a)])

  1. print(len(a)-1)

  1. print(a[len(a)-1])

  1. print(len(a))

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Câu 4. Cho đoạn lệnh sau:

a=[5,7,3,4,1]

a.insert(2,9)

Danh sách a thu được là:

[5,9,7,3,4,1]

[5,7,9,3,4,1]

[5,7,3,4,1,2,9]

[2,9,5,7,3,4,1]

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Câu 5. Để xóa phần tử thứ 2 trong danh sách a ta dùng lệnh:

  1. del(a[2]) 

  1. del(a[1])

  1. remove(a[2])

  1. remove(a[1]) 

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Câu 6. Cho đoạn lệnh sau:

a=[7,3,8,1,9]

del(a[3])

Danh sách a thu được là:

  1. [7,8,1,9]

  1. [7,3,1,9]

  1. [7,3,8,9]

  1. [7,3,8,1]

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Câu 7. Cho danh sách a = [1, 2, 3, 4, 5]. Lệnh nào dưới đây sẽ thêm số 6 vào danh sách a?

a.append(6)

a.insert(6)

a.add(6)

a.extend(6)

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?