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 Trong Python

Quiz
•
Science
•
10th Grade
•
Hard
Nguyễn Tâm
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
12 questions
Цикл for

Quiz
•
7th Grade - University
12 questions
判斷式

Quiz
•
1st Grade - Professio...
12 questions
Chapter 10: Handwriting Analysis, Forgery, and Counterfeiting

Quiz
•
9th - 12th Grade
15 questions
3D Printing

Quiz
•
7th Grade - University
10 questions
Quizz_Python_Basic_If_Elif_Else

Quiz
•
9th Grade - University
10 questions
Reconhecimento de voz

Quiz
•
10th - 12th Grade
10 questions
Тест. Логічні операції

Quiz
•
7th - 12th Grade
10 questions
BaiThucHanhKieuDanhSach-Python

Quiz
•
10th Grade
Popular Resources on Quizizz
10 questions
Chains by Laurie Halse Anderson Chapters 1-3 Quiz

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
15 questions
Character Analysis

Quiz
•
4th Grade
12 questions
Multiplying Fractions

Quiz
•
6th Grade
30 questions
Biology Regents Review #1

Quiz
•
9th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
Discover more resources for Science
50 questions
Biology Regents Review: Structure & Function

Quiz
•
9th - 12th Grade
50 questions
Biology Regents Review 2: Ecology

Quiz
•
9th - 12th Grade
20 questions
MCAS Biology Review

Quiz
•
9th - 10th Grade
85 questions
Regents Living Environment

Quiz
•
8th - 11th Grade
35 questions
Regents ES - Climate

Quiz
•
8th - 10th Grade
22 questions
Earth Science Reference Tables Review

Lesson
•
9th - 12th Grade
20 questions
Trimester 3 Exam Review Part 2 24-25

Quiz
•
9th - 10th Grade
35 questions
Regents Earth Science Review

Quiz
•
9th - 12th Grade