Câu lệnh nào dùng để kiểm tra một điều kiện trong Python?

Kiểm Tra Cấu Trúc Rẽ Nhánh Python

Quiz
•
Information Technology (IT)
•
10th Grade
•
Hard
Minht Phy
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
switch
if
test
check
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cặp từ khóa nào thường đi với nhau trong cấu trúc rẽ nhánh hai nhánh?
if - elif
elif - else
if - else
else - if
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả của đoạn mã: x=7; if x>5: print("Lớn hơn 5") là gì?
Không in gì
Báo lỗi
In ra: Lớn hơn 5
In ra: 5
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, từ khóa nào dùng để kiểm tra nhiều điều kiện liên tiếp?
while
elif
elseif
for
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Phát biểu nào sau đây là đúng?
if luôn phải đi với else
Python không hỗ trợ rẽ nhánh
Có thể dùng if mà không else
if và else là bắt buộc
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả đoạn mã: a=3; if a%2==0: print("Chẵn") else: print("Lẻ") là gì?
In ra: Chẵn
In ra: Lẻ
Không in gì
Lỗi do thiếu dấu :
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chọn đoạn mã đúng cú pháp trong Python
if (x > 5) then print("Lớn")
if x > 5: print("Lớn")
if x > 5 then: print("Lớn")
if x > 5 then print("Lớn")
Create a free account and access millions of resources
Similar Resources on Quizizz
10 questions
Ôn tập biến và lệnh gán trong Python

Quiz
•
10th Grade
15 questions
Bài 25

Quiz
•
10th Grade - University
11 questions
7.3.3 Console Input & Output

Quiz
•
10th Grade
5 questions
Блиц-опрос

Quiz
•
7th Grade - University
15 questions
Quiz Pemrograman Python

Quiz
•
10th Grade - University
7 questions
Lekcja 2.3

Quiz
•
5th Grade - University
15 questions
Bài 26

Quiz
•
10th Grade - University
15 questions
Bài 24

Quiz
•
10th Grade - University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Information Technology (IT)
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University