
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
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?
Similar Resources on Wayground
10 questions
Quizzi bài 29 Tin học 10
Quiz
•
10th Grade - University
10 questions
Tin 9 Bài 8. SUMIF
Quiz
•
9th Grade - University
20 questions
Python
Quiz
•
9th - 12th Grade
10 questions
0- and 1-Pixel Art Activity
Quiz
•
9th - 12th Grade
10 questions
Network Configuration Quiz
Quiz
•
9th - 12th Grade
20 questions
FASE E. TIK. ULANGAN HARIAN APL ANGKA, KATA, PRESENTASI
Quiz
•
10th Grade
11 questions
Câu Lệnh Rẽ Nhánh IF ELSE
Quiz
•
10th Grade
15 questions
Khảo Sát Chất Lượng Môn TIN 8
Quiz
•
8th Grade - University
Popular Resources on Wayground
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
9 questions
FOREST Community of Caring
Lesson
•
1st - 5th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
19 questions
Veterans Day
Quiz
•
5th Grade
14 questions
General Technology Use Quiz
Quiz
•
8th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
15 questions
Circuits, Light Energy, and Forces
Quiz
•
5th Grade
19 questions
Thanksgiving Trivia
Quiz
•
6th Grade
Discover more resources for Information Technology (IT)
10 questions
Honoring the Significance of Veterans Day
Interactive video
•
6th - 10th Grade
10 questions
Exploring Veterans Day: Facts and Celebrations for Kids
Interactive video
•
6th - 10th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
10 questions
Exploring the Origins of Veterans Day
Interactive video
•
6th - 10th Grade
28 questions
Ser vs estar
Quiz
•
9th - 12th Grade
10 questions
Understanding Protein Synthesis
Interactive video
•
7th - 10th Grade
10 questions
Exploring Newton's Laws of Motion
Interactive video
•
6th - 10th Grade
10 questions
Exploring the Origins of Veterans Day
Interactive video
•
6th - 10th Grade
