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

Cấu truc rẽ nhánh

Quiz
•
Other
•
10th Grade
•
Hard
Đỗ Trinh
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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")
Create a free account and access millions of resources
Similar Resources on Wayground
15 questions
k10-1-python

Quiz
•
10th Grade
10 questions
Introductory Quiz

Quiz
•
9th - 12th Grade
11 questions
Kiểm Tra Trắc Nghiệm Tin Học 10

Quiz
•
10th Grade
12 questions
Intro to Python Programming Quiz 9C

Quiz
•
10th Grade - University
14 questions
Intro to Python Programming Quiz 9B

Quiz
•
10th Grade - University
10 questions
#Sg_Spaic Last season Quiz (ML and Python)

Quiz
•
KG - Professional Dev...
10 questions
Xâu kí tự

Quiz
•
10th Grade
10 questions
Kiểm Tra Tin Học 10

Quiz
•
10th Grade
Popular Resources on Wayground
25 questions
Equations of Circles

Quiz
•
10th - 11th Grade
30 questions
Week 5 Memory Builder 1 (Multiplication and Division Facts)

Quiz
•
9th Grade
33 questions
Unit 3 Summative - Summer School: Immune System

Quiz
•
10th Grade
10 questions
Writing and Identifying Ratios Practice

Quiz
•
5th - 6th Grade
36 questions
Prime and Composite Numbers

Quiz
•
5th Grade
14 questions
Exterior and Interior angles of Polygons

Quiz
•
8th Grade
37 questions
Camp Re-cap Week 1 (no regression)

Quiz
•
9th - 12th Grade
46 questions
Biology Semester 1 Review

Quiz
•
10th Grade