
Câu lệnh rẽ nhánh trong Python
Quiz
•
Information Technology (IT)
•
10th Grade
•
Practice Problem
•
Medium
THI CAM TIEN QUACH
Used 5+ times
FREE Resource
Enhance your content in a minute
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh if đơn giản trong Python có cú pháp như thế nào?
if <điều kiện>:
if
if
if
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi nào thì sử dụng câu lệnh elif trong Python?
Sử dụng câu lệnh elif khi chỉ cần kiểm tra một điều kiện.
Sử dụng câu lệnh elif để lặp qua danh sách.
Sử dụng câu lệnh elif khi cần kiểm tra nhiều điều kiện trong cấu trúc điều kiện.
Sử dụng câu lệnh elif khi không cần kiểm tra điều kiện nào.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho ví dụ về câu lệnh if lồng nhau trong Python.
if x > 10: print('x là số dương lớn hơn 10')
if x == 10: print('x là số bằng 10')
if x < 0: print('x là số âm')
if x > 0: if x < 10: print('x là số dương nhỏ hơn 10') else: print('x là số dương lớn hơn hoặc bằng 10')
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh if có thể kiểm tra nhiều điều kiện cùng lúc không?
Không, câu lệnh if không thể kiểm tra điều kiện nào.
Có, nhưng chỉ trong một số ngôn ngữ lập trình.
Không, câu lệnh if chỉ kiểm tra một điều kiện.
Có, câu lệnh if có thể kiểm tra nhiều điều kiện cùng lúc.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cú pháp của câu lệnh if với điều kiện phức tạp là gì?
if (condition1 condition2) { // code to execute }
if (condition1 && condition2) { // code to execute }
if (condition1 && condition2 || condition3) { // code to execute }
if (condition1 || condition2 && condition3) { // code to execute }
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Làm thế nào để sử dụng câu lệnh if trong vòng lặp?
Sử dụng câu lệnh if bên trong vòng lặp để kiểm tra điều kiện.
Câu lệnh if không thể được sử dụng trong vòng lặp.
Chỉ sử dụng vòng lặp mà không cần câu lệnh if.
Sử dụng câu lệnh if bên ngoài vòng lặp để kiểm tra điều kiện.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh if có thể kết hợp với toán tử logic nào?
XOR
AND, OR, NOT
NAND
NOR
Create a free account and access millions of resources
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?
Similar Resources on Wayground
15 questions
MakeCode Arcade Questions
Quiz
•
10th Grade - University
19 questions
Тест по Циклам Python (Cycles2)
Quiz
•
9th Grade - University
20 questions
PIT_10.06-10_ASMT
Quiz
•
9th Grade - University
10 questions
Evaluasi Percabangan C
Quiz
•
10th Grade
11 questions
Tech+ 2.3.3 Understanding Passwords and Security
Quiz
•
10th Grade
10 questions
Module 2.2.6 Quiz
Quiz
•
10th Grade
10 questions
Pengenalan Algoritma
Quiz
•
10th Grade
20 questions
Fase D. BK. Refleksi, Assessment, Pengayaan
Quiz
•
10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
20 questions
Christmas Trivia
Quiz
•
6th - 8th Grade
18 questions
Kids Christmas Trivia
Quiz
•
KG - 5th Grade
11 questions
How well do you know your Christmas Characters?
Lesson
•
3rd Grade
14 questions
Christmas Trivia
Quiz
•
5th Grade
20 questions
How the Grinch Stole Christmas
Quiz
•
5th Grade
Discover more resources for Information Technology (IT)
10 questions
Identify Iconic Christmas Movie Scenes
Interactive video
•
6th - 10th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
26 questions
Christmas Movie Trivia
Lesson
•
8th Grade - Professio...
15 questions
Christmas Song Emoji Pictionary
Quiz
•
7th - 12th Grade
20 questions
Christmas Movies
Quiz
•
1st - 12th Grade
10 questions
Exploring Christmas Traditions Through Cartoons
Interactive video
•
6th - 10th Grade
20 questions
Christmas Movie Trivia
Quiz
•
9th - 12th Grade
33 questions
Algebra 1 Semester 1 Final 2025
Quiz
•
8th - 10th Grade
