Kiểu danh sách Python
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Medium
thuy ngan
Used 6+ times
FREE Resource
Enhance your content in a minute
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
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
CỦNG CỐ KIẾN THỨC BÀI 2 - TIN HỌC 12
Quiz
•
10th - 12th Grade
10 questions
ExamenHojasdecalculo
Quiz
•
10th Grade
10 questions
Java: repetition control structure for & while
Quiz
•
10th - 12th Grade
10 questions
Lesson 1 Introduction to Database System
Quiz
•
10th Grade
15 questions
Cyber Security KS4
Quiz
•
8th - 12th Grade
10 questions
Alapismeretek
Quiz
•
7th - 12th Grade
13 questions
WJEC GCSE ICT Unit 1 E-Mail
Quiz
•
9th - 10th Grade
10 questions
Scratch
Quiz
•
KG - Professional Dev...
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
