Câu hỏi về Python

Câu hỏi về Python

9th Grade

20 Qs

quiz-placeholder

Similar activities

LA3.C3: Variables

LA3.C3: Variables

9th Grade - University

16 Qs

Python Review

Python Review

9th - 12th Grade

16 Qs

Lớp 3

Lớp 3

5th - 10th Grade

15 Qs

BÀI KTTX SỐ 2

BÀI KTTX SỐ 2

9th Grade

20 Qs

Programming

Programming

9th - 11th Grade

20 Qs

Grade 8 End of Unit Revision

Grade 8 End of Unit Revision

8th Grade - University

15 Qs

BÀI 16. ĐỊNH DẠNG VĂN BẢN

BÀI 16. ĐỊNH DẠNG VĂN BẢN

5th - 12th Grade

20 Qs

Bài 5. Thao tác với bảng tính

Bài 5. Thao tác với bảng tính

1st - 12th Grade

20 Qs

Câu hỏi về Python

Câu hỏi về Python

Assessment

Quiz

Computers

9th Grade

Practice Problem

Medium

Created by

nhut huynh

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

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")

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?