
Câu hỏi về Python

Quiz
•
Computers
•
9th Grade
•
Medium
nhut huynh
Used 1+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cách nào sau đây để tạo danh sách trong Python?
my_list = {1, 2, 3}
my_list = [1, 2, 3]
my_list = (1, 2, 3)
my_list = "<1, 2, 3>"
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để thêm một phần tử vào danh sách foods, ta dùng phương thức nào?
foods.add("Pizza")
foods.insert("Pizza")
foods.append("Pizza")
foods.put("Pizza")
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh nào giúp thay đổi phần tử tại vị trí index trong danh sách colors?
colors(index) = "Đỏ"
colors[index] = "Đỏ"
colors.replace(index, "Đỏ")
colors.change(index, "Đỏ")
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để xóa phần tử có giá trị "Mèo" khỏi danh sách animals, ta dùng?
animals.pop("Mèo")
animals.delete("Mèo")
animals.remove("Mèo")
animals.erase("Mèo")
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn code sau là gì? numbers = [3, 7, 9] for i, num in enumerate(numbers): print(i, num)
Lỗi cú pháp
In ra từng số nhưng không có chỉ mục
In ra cả chỉ mục và số
Chỉ in số cuối cùng
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để tạo dictionary lưu thông tin sách, ta dùng cách nào?
book = ["title": "Python", "author": "Guido"]
book = {"title": "Python", "author": "Guido"}
book = ("title", "Python", "author", "Guido")
book = ["title", "Python", "author", "Guido"]
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để thêm cặp "Alice": "0987654321" vào danh bạ contacts, ta dùng?
contacts.add("Alice", "0987654321")
contacts.insert("Alice", "0987654321")
contacts["Alice"] = "0987654321"
contacts.put("Alice", "0987654321")
Create a free account and access millions of resources
Similar Resources on Wayground
20 questions
ÔN TẬP GIỮA KÌ 1 TIN 9

Quiz
•
9th Grade
15 questions
BÀI 5. INTERNET

Quiz
•
1st - 12th Grade
21 questions
Tin học Lớp 5

Quiz
•
4th - 12th Grade
16 questions
Bài 2: Mạng toàn cầu thông tin

Quiz
•
9th Grade
20 questions
IC3 SPARK LV3 - CHỦ ĐỀ 4 - SÁNG TẠO NỘI DUNG - LỚP 5

Quiz
•
5th Grade - University
20 questions
Ôn tập chương I - Mạng máy tính

Quiz
•
9th Grade
20 questions
BÀI 6 ĐỊNH DẠNG TRANG TÍNH

Quiz
•
1st - 12th Grade
16 questions
Ôn tập Tin học Lớp 3_CKI

Quiz
•
3rd Grade - University
Popular Resources on Wayground
50 questions
Trivia 7/25

Quiz
•
12th Grade
11 questions
Standard Response Protocol

Quiz
•
6th - 8th Grade
11 questions
Negative Exponents

Quiz
•
7th - 8th Grade
12 questions
Exponent Expressions

Quiz
•
6th Grade
4 questions
Exit Ticket 7/29

Quiz
•
8th Grade
20 questions
Subject-Verb Agreement

Quiz
•
9th Grade
20 questions
One Step Equations All Operations

Quiz
•
6th - 7th Grade
18 questions
"A Quilt of a Country"

Quiz
•
9th Grade