Search Header Logo

Python-1

Authored by Minh Nguyễn

English

1st - 5th Grade

Used 2+ times

Python-1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Trong Python, biến nào sau đây là hợp lệ?

2var = 10

my-variable = 5

_myVar = "Hello"

class = 100

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Trong Python, cách nào sau đây để gán giá trị cho nhiều biến cùng một lúc là đúng?

x = y = z = 10

x, y, z == 10

x = (y = z = 10)

x y z = 10

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Trong Python, cách nào sau đây dùng để tạo một từ điển rỗng?

dict = []

dict = {}

dict = ()

dict = ""

4.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Phương thức nào sau đây được sử dụng để xóa một cặp khóa-giá trị trong từ điển Python?

remove("key")

del dict["key"]

discard("key")

clear("key")

5.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Trong Python, cách nào sau đây dùng để thêm một phần tử vào danh sách (list)?

list.add(item)

list.append(item)

list.insertLast(item)

list.push(item)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Giả sử có danh sách nums = [1, 2, 3, 4], câu lệnh nào sẽ xóa phần tử có giá trị 3?

nums.pop(3)

nums.delete(3)

nums.remove(3)

del nums(3)

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Điều gì xảy ra nếu điều kiện trong câu lệnh if là False và không có else đi kèm?

Chương trình báo lỗi

Chương trình dừng ngay lập tức

Không có gì xảy ra, khối lệnh if bị bỏ qua

Python tự động thêm một lệnh else mặc định

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?