
CP2-PTI
Quiz
•
Science
•
11th Grade
•
Practice Problem
•
Hard
Nguyễn Linh
Used 1+ times
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Tại sao cần sử dụng định dạng JSON?
Vì JSON là một ngôn ngữ lập trình chuyên dụng, giúp tối ưu hóa hiệu suất hệ thống
Do JSON có cấu trúc dữ liệu phức tạp, giúp bảo vệ thông tin quan trọng
JSON là một định dạng dữ liệu nhẹ và dễ đọc, thích hợp cho việc truyền tải thông tin giữa các ứng dụng.
Vì JSON là ngôn ngữ dựa trên JavaScript, giúp tương thích tốt với nhiều ứng dụng web hiện đại.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh nào sau đây có tác dụng đọc file JSON trong Python?
readFile("data.json")
loadJSON("data.json")
parseJSON("data.json")
json.load(open("data.json")
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi nào cần thực hiện hàm ghi file JSON? Chọn đáp án đúng nhất.
Khi cần đọc dữ liệu từ chỉ một file JSON.
Mỗi khi danh sách đối tượng có thay đổi.
Khi muốn thay đổi nội dung của danh sách đối tượng.
Khi chỉ cần đọc dữ liệu mà không cần ghi lại.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong PyQt6, để thực hiện các thao tác thêm, xoá và sửa đổi dữ liệu trong một QListWidget, bạn sẽ sử dụng những phương thức nào?
addItem, removeItem, editItem
append, delete, modify
insertItem, takeItem, setItem
addEntry, removeEntry, updateEntry
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để hiển thị danh sách các phần tử từ file dữ liệu lên giao diện ứng dụng. Bạn sẽ thực hiện các bước nào sau đây để đạt được mục tiêu này?
Kết nối với file dữ liệu, truy vấn dữ liệu và thêm từng mục vào QTableWidget bằng phương thức addItem.
Kết nối với file dữ liệu, truy vấn dữ liệu và thêm từng mục vào QListWidget bằng phương thức addItem
Chỉ cần tạo một QTableWidget và sau đó thêm các mục một cách bình thường với addEntry để hiển thị dữ liệu từ cơ sở dữ liệu.
Chỉ cần tạo một QListWidget và sau đó thêm các mục một cách bình thường với addEntry để hiển thị dữ liệu từ cơ sở dữ liệu
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn code sau có vấn đề gì?
def initUI(self):
self.list_widget = QListWidget(self)
person_list = [ Person("John Doe", 25), Person("Jane Smith", 30), Person("Bob Johnson", 22) ]
for person in person_list:
item = QListWidgetItem(f"Name: {person.name}, Age: {person.age}") self.list_widget.addItem(item)
del person_list[0
Phải sử dụng addItems thay vì addItem.
Phải sử dụng lệnh pop thay vì lệnh del để xoá đối tượng.
Xóa đối tượng trong danh sách đối tượng nhưng chưa xoá trong QListWidget.
Không có vấn đề gì.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn code sau có vấn đề gì?
def search(self):
search_anime_field = widgets.inputAnime.text()
if search_anime_field:
matched_items = widgets.animeList.findItems(search_anime_field, Qt.MatchFlag.MatchContains) for i in range(widgets.animeList.count()):
it = widgets.animeList.item(i)
it.setHidden(it not in matched_items)
else:
for i in range(widgets.animeList.count()):
it = widgets.animeList.item(i)
it.setHidden(False)
Chưa xử lý string search_anime_field.
Phải sử dụng findItem thay vì findItems.
Sai điều kiện tìm trong phương thức findItems.
Không có vấn đề gì.
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
8 questions
Vật Liệu và Dụng Cụ Trồng Hoa 41
Quiz
•
4th Grade - University
14 questions
Introduction to Assets, Liabilities, Net Worth, and Entrepreneurship
Quiz
•
11th Grade
15 questions
African Kingdom Historical Snapshot Quiz
Quiz
•
6th Grade - University
10 questions
Tiêu diệt mấy đứa không học hóa
Quiz
•
11th Grade
12 questions
Environmental Ethics/Worldviews
Quiz
•
9th - 12th Grade
14 questions
Medical Conditions
Quiz
•
9th - 12th Grade
10 questions
Dược lý- Dược lý đại cương
Quiz
•
KG - Professional Dev...
10 questions
Vòng 2: Vua kiến thức - Ai là đại sứ môi trường?
Quiz
•
9th - 12th 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
Discover more resources for Science
14 questions
Natural Selection and Adaptation
Lesson
•
9th - 12th Grade
38 questions
Water Cycle and Groundwater
Quiz
•
9th - 12th Grade
12 questions
Cell Organelles and Their Functions
Lesson
•
9th - 12th Grade
12 questions
Homeostasis: Positive and Negative Feedback Loops
Interactive video
•
11th Grade
13 questions
Amoeba Sisters: Biomolecules
Interactive video
•
9th - 12th Grade
60 questions
2025 Genetics Test Study Guide
Quiz
•
9th - 12th Grade
10 questions
Understand Cell Functions and Organelles
Quiz
•
9th - 12th Grade
16 questions
Explore Cell Cycle Stages and Mitosis
Quiz
•
9th - 12th Grade
