Kiểu danh sách Python

Quiz
•
Computers
•
10th Grade
•
Medium
thuy ngan
Used 6+ times
FREE Resource
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)
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 Wayground
5 questions
Ôn tập Bài 22. Kiểu dữ liệu danh sách

Quiz
•
10th Grade
11 questions
TIN HỌC B23_10

Quiz
•
10th Grade
11 questions
Tin học 10

Quiz
•
9th - 12th Grade
15 questions
Bài 22-Kiểu dữ liệu danh sách

Quiz
•
10th Grade
10 questions
Bài 25-Một số lệnh làm việc với xâu kí tự

Quiz
•
10th Grade
10 questions
Kiểm tra Tin học

Quiz
•
10th Grade
10 questions
trắc nghiệm tin

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

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade