
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
Để khởi tạo danh sách b có 5 phần tử 1, 2, 3, 4, 5 ta dùng viết:
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 Wayground
15 questions
KTTX K10 HK2_Kiểu DL DS

Quiz
•
10th Grade
10 questions
Kiểm tra Tin hoc 10 Bai 22, 23

Quiz
•
10th Grade
15 questions
Tin 10 CD 29.3.2024

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

Quiz
•
10th Grade
15 questions
Khoo

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

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

Quiz
•
10th Grade
15 questions
TIN 8 (ĐỀ 2) - KTHK2

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