Search Header Logo

Cấu truc rẽ nhánh

Authored by Đỗ Trinh

Other

10th Grade

Used 1+ times

Cấu truc rẽ nhánh
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh nào dùng để rẽ nhánh trong Python?

switch

loop

if

while

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Lệnh if hoạt động như thế nào?

Luôn thực hiện

Thực hiện khi điều kiện đúng

Bỏ qua khi đúng

Báo lỗi khi điều kiện sai

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cú pháp đúng của lệnh if là:

if (a > b) then:

if a > b:

if a > b then

if a > b {} else {}

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cho đoạn mã sau:

python

CopyEdit

x = 5

if x % 2 == 0:

    print("Chẵn")

else:

    print("Lẻ")

Kết quả in ra là gì?

Chẵn

Lẻ

Không có gì

Lỗi

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Phát biểu nào đúng về thụt lề trong Python?

Có thể viết liền dòng

Không cần cách lề

Cách lề sai gây lỗi

Dùng dấu chấm phẩy để kết thúc lệnh

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Điều kiện x > 10 or x < 3 đúng khi nào?

x = 5

x = 8

x = 12

x = 10

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Chọn lệnh Python đúng để kiểm tra số a là âm hay không:

if a < 0: print("Âm")

if a < 0 print("Âm")

if a < 0) print("Âm")

if (a < 0) then print("Âm")

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?