
Cấu trúc rẽ nhánh trong Python
Authored by Phan HPG)
Computers
10th Grade
Used 4+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
12 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh if trong Python được sử dụng để làm gì?
Kiểm tra điều kiện và thực thi khối lệnh nếu điều kiện đúng.
Kết thúc chương trình ngay lập tức.
Tạo ra một biến mới trong Python.
Thực hiện vòng lặp qua các phần tử.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cú pháp của câu lệnh if-else trong Python là gì?
if condition: # code to execute if condition is true else: # code to execute if condition is false
if condition then: # code to execute if condition is true else: # code to execute if condition is false
if (condition) { # code to execute if condition is true } else { # code to execute if condition is false }
if condition: # code to execute if condition is false else: # code to execute if condition is true
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Biểu thức điều kiện trong câu lệnh if phải trả về kiểu dữ liệu nào?
float
boolean
string
integer
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi nào thì câu lệnh else được thực thi?
Khi điều kiện trong câu lệnh if không được thỏa mãn.
Khi điều kiện trong câu lệnh if được thỏa mãn.
Khi chương trình kết thúc.
Khi câu lệnh if không tồn tại.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh if có thể lồng nhau không?
Chỉ có thể lồng if với else.
Không, câu lệnh if không thể lồng nhau.
Câu lệnh if chỉ có thể sử dụng một lần.
Có, câu lệnh if có thể lồng nhau.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cú pháp của câu lệnh if-elif-else là gì?
if điều_kiện: // kiểm tra
if điều_kiện: // thực hiện ngay
if điều_kiện: // thực hiện elif điều_kiện: // thực hiện else: // thực hiện
if điều_kiện: // không thực hiện
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi nào thì câu lệnh elif được sử dụng?
Khi không cần sử dụng cấu trúc điều kiện.
Khi muốn kết thúc chương trình ngay lập tức.
Khi chỉ cần kiểm tra một điều kiện đơn giản.
Khi cần kiểm tra nhiều điều kiện trong cấu trúc điều kiện.
Access all questions and much more by creating a free account
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
10 questions
Паскаль. Основные команды
Quiz
•
8th - 11th Grade
13 questions
ÔN TẬP WHILE & IF
Quiz
•
10th Grade
10 questions
CyberCrime
Quiz
•
5th Grade - Professio...
10 questions
Excel
Quiz
•
10th - 11th Grade
15 questions
J808 LO1 and LO2 planning project keywords / terms
Quiz
•
9th - 11th Grade
17 questions
Email Lớp 6
Quiz
•
6th Grade - University
10 questions
Social media influencers
Quiz
•
6th - 12th Grade
10 questions
Spreadsheet Rumus statistik
Quiz
•
10th Grade
Popular Resources on Wayground
7 questions
History of Valentine's Day
Interactive video
•
4th Grade
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
22 questions
fractions
Quiz
•
3rd Grade
15 questions
Valentine's Day Trivia
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
Discover more resources for Computers
10 questions
Exploring Valentine's Day with Charlie Brown
Interactive video
•
6th - 10th Grade
18 questions
Valentines Day Trivia
Quiz
•
3rd Grade - University
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Valentine's Day History and Traditions
Interactive video
•
6th - 10th Grade
21 questions
Presidents Day Trivia
Quiz
•
6th - 12th Grade
10 questions
Valentine's Day: History and Modern Celebration
Interactive video
•
9th - 12th Grade
11 questions
Valentine's Day Trivia
Quiz
•
8th - 12th Grade
10 questions
Factor Quadratic Expressions with Various Coefficients
Quiz
•
9th - 12th Grade