
Cấu Trúc Vòng Lặp While
Quiz
•
Other
•
10th Grade
•
Practice Problem
•
Hard
Nguyễn Trang
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Câu lệnh `while` dùng để làm gì trong lập trình?
Thực hiện một lần duy nhất đoạn mã
Lặp đoạn mã một số lần xác định
Lặp đoạn mã khi điều kiện còn đúng
Ngắt chương trình
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, cú pháp của vòng lặp `while` là gì?
while (condition) { statements }
while: condition { statements }
while condition:
while = condition:
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Vòng lặp `while` kết thúc khi nào?
Khi hết bộ nhớ
Khi điều kiện sai
Khi người dùng nhập số 0
Khi chương trình dừng đột ngột
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Đoạn mã sau thực hiện điều gì? x = 1; while x < 5: print(x); x += 1
In ra các số từ 0 đến 5
In ra các số từ 1 đến 4
In ra các số từ 1 đến 5
Vòng lặp vô hạn
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Vì sao cần tăng biến `x` trong vòng lặp `while`?
Để giảm tốc độ chương trình
Để tránh lặp vô hạn
Để in ra chữ cái
Để kiểm tra cú pháp
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Khi sử dụng `while`, nếu điều kiện ban đầu là `False` thì:
Vòng lặp sẽ không thực hiện lần nào
Vòng lặp vẫn thực hiện 1 lần
Lỗi cú pháp xảy ra
Máy tính treo
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chọn đoạn mã đúng để tính tổng từ 1 đến 5:
sum = 0; i = 1; while i < 6: sum += i; i += 1
sum = 0; i = 1; while i <= 5: i += 1; sum += i
sum = 0; i = 1; while i <= 5: sum += i
sum = 0; i = 1; while i <= 5: sum += i; i += 1
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
10 câu hỏi cực dễ về anime
Quiz
•
5th Grade - University
10 questions
Triết học_Buổi 13
Quiz
•
1st - 10th Grade
10 questions
In re Gault
Quiz
•
KG - University
12 questions
Career Development Portfolio
Quiz
•
9th - 12th Grade
10 questions
HOẠT ĐỘNG TRẢI NGHIỆM
Quiz
•
10th Grade
11 questions
MINECRAFT
Quiz
•
KG - Professional Dev...
11 questions
Minigame Nâng cao năng lực TPP Quý 1.2025
Quiz
•
10th Grade
10 questions
BIAYA PRODUKSI
Quiz
•
10th Grade
Popular Resources on Wayground
15 questions
Fractions on a Number Line
Quiz
•
3rd Grade
20 questions
Equivalent Fractions
Quiz
•
3rd Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
54 questions
Analyzing Line Graphs & Tables
Quiz
•
4th Grade
22 questions
fractions
Quiz
•
3rd Grade
20 questions
Main Idea and Details
Quiz
•
5th Grade
20 questions
Context Clues
Quiz
•
6th Grade
15 questions
Equivalent Fractions
Quiz
•
4th Grade
Discover more resources for Other
20 questions
-AR -ER -IR present tense
Quiz
•
10th - 12th Grade
10 questions
Understanding Meiosis
Interactive video
•
6th - 10th Grade
15 questions
Making Inferences
Quiz
•
7th - 12th Grade
18 questions
SAT Prep: Ratios, Proportions, & Percents
Quiz
•
9th - 10th Grade
15 questions
Main Idea and Supporting Details.
Quiz
•
4th - 11th Grade
12 questions
Parallel Lines Cut by a Transversal
Quiz
•
10th Grade
12 questions
Add and Subtract Polynomials
Quiz
•
9th - 12th Grade
7 questions
How James Brown Invented Funk
Interactive video
•
10th Grade - University
