Để khởi tạo danh sách b có 5 phần tử 1, 2, 3, 4, 5 ta dùng viết:

Câu hỏi về danh sách trong Python

Quiz
•
Computers
•
10th Grade
•
Medium
Hang Minh
Used 9+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
b = 1, 2, 3, 4, 5
b = (1, 2, 3, 4, 5)
b = [1..5]
b = [1, 2, 3, 4, 5]
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để thêm phần tử vào cuối danh sách ta dùng hàm:
append()
pop()
clear()
remove()
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh a.sort() thực hiện:
Xóa danh sách a.
Sắp xếp danh sách a theo thứ tự không giảm.
Sắp xếp danh sách a theo thứ tự không tăng.
Gọi đến phần tử đầu tiên trong danh sách a
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho danh sách a gồm các phần tử [3,4,5]. Khi đó len(a)=?
1
2
3
4
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào dùng để lấy phần tử thứ 2 trong danh sách a = [10, 20, 30, 40]?
a(2)
a[2]
a[1]
a{2}
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn mã sau là gì? a = [5, 3, 8, 1] a.sort() print(a)
[5, 3, 8, 1]
[1, 3, 5, 8]
[8, 5, 3, 1]
Lỗi chương trình
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả đoạn mã sau là gì? a = [10, 20, 30, 40] a.pop(1) print(a)
[10, 30, 40]
[10, 20, 30]
[20, 30, 40]
[10, 30]
Create a free account and access millions of resources
Similar Resources on Quizizz
11 questions
ôn tập if - for - ds

Quiz
•
10th Grade
15 questions
tinGk

Quiz
•
10th Grade
10 questions
BAI 24_LOP10_BAITAP

Quiz
•
10th Grade
10 questions
ÔN TẬP KIẾN THỨC XÂU KÍ TỰ

Quiz
•
9th - 12th Grade
10 questions
TIN 10_B22_LIST

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

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

Quiz
•
10th Grade
10 questions
KT 15 PHÚT TIN 6 - HKII(L2)

Quiz
•
7th Grade - University
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