
Kiểu danh sách Python
Authored by thuy ngan
Computers
10th Grade
Used 6+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
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)
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
# REVIEW 1 DATA TYPES
Quiz
•
10th Grade
11 questions
Threats to Data
Quiz
•
9th - 12th Grade
10 questions
Basic Parts of Speech EPS
Quiz
•
9th - 10th Grade
15 questions
Quiz 1
Quiz
•
1st - 12th Grade
10 questions
Google Apps
Quiz
•
10th Grade - Professi...
10 questions
PUNCTUATION SPACING RULES
Quiz
•
9th - 12th Grade
10 questions
Ứng xử trong môi trường số
Quiz
•
10th Grade
9 questions
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
10th - 11th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
20 questions
Figurative Language Review
Quiz
•
6th Grade