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?
Kiểu danh sách Python

Quiz
•
Computers
•
10th Grade
•
Hard
thuy ngan
Used 4+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
a = (10,20,30)
a = {10,20,30}
a = [10,20,30]
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?
a ==[]
a= 0
a = []
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?
print(a[len(a)])
print(len(a)-1)
print(a[len(a)-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:
del(a[2])
del(a[1])
remove(a[2])
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à:
[7,8,1,9]
[7,3,1,9]
[7,3,8,9]
[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
Similar Resources on Quizizz
12 questions
BAI 25_TINHOC

Quiz
•
10th Grade
10 questions
Bài 26-Hàm trong Python

Quiz
•
10th Grade
10 questions
Bài 23-Một số lệnh làm việc với dữ liệu danh sách

Quiz
•
10th Grade
15 questions
tinGk

Quiz
•
10th Grade
15 questions
Ôn tập Python

Quiz
•
9th - 12th Grade
14 questions
Bài 29. Nhận biết lỗi chương trình

Quiz
•
9th - 12th Grade
10 questions
Trắc nghiệm Bài 26 Hàm trong Python

Quiz
•
10th Grade
11 questions
ôn tập if - for - ds

Quiz
•
10th Grade
Popular Resources on Quizizz
15 questions
Multiplication Facts

Quiz
•
4th Grade
20 questions
Math Review - Grade 6

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
5 questions
capitalization in sentences

Quiz
•
5th - 8th Grade
10 questions
Juneteenth History and Significance

Interactive video
•
5th - 8th Grade
15 questions
Adding and Subtracting Fractions

Quiz
•
5th Grade
10 questions
R2H Day One Internship Expectation Review Guidelines

Quiz
•
Professional Development
12 questions
Dividing Fractions

Quiz
•
6th Grade
Discover more resources for Computers
25 questions
Spanish preterite verbs (irregular/changed)

Quiz
•
9th - 10th Grade
10 questions
Juneteenth: History and Significance

Interactive video
•
7th - 12th Grade
8 questions
"Keeping the City of Venice Afloat" - STAAR Bootcamp, Day 1

Quiz
•
9th - 12th Grade
20 questions
Distance, Midpoint, and Slope

Quiz
•
10th Grade
20 questions
Figurative Language Review

Quiz
•
10th Grade
20 questions
Understanding Linear Equations and Slopes

Quiz
•
9th - 12th Grade