
Cấu Trúc Vòng Lặp While
Quiz
•
Science
•
10th Grade
•
Practice Problem
•
Hard
Nguyễn Tâm
Used 2+ times
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
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
10 questions
World Water Day Quiz
Quiz
•
1st - 12th Grade
10 questions
B1.Quiz TT và Xử Lí TT_K10
Quiz
•
10th Grade
10 questions
Oxi - lưu huỳnh - ozon
Quiz
•
10th Grade
13 questions
ÔN TẬP VI KHUẨN
Quiz
•
5th Grade - University
14 questions
Types of Graphs & Graphing
Quiz
•
9th - 12th Grade
10 questions
Physical Properties of Matter
Quiz
•
9th - 10th Grade
10 questions
Toll's Atoms, Ions, and Molecules Quiz
Quiz
•
10th Grade
15 questions
Science 10_4th Quarterly Exams Review_SY 23-24
Quiz
•
10th Grade
Popular Resources on Wayground
5 questions
This is not a...winter edition (Drawing game)
Quiz
•
1st - 5th Grade
15 questions
4:3 Model Multiplication of Decimals by Whole Numbers
Quiz
•
5th Grade
25 questions
Multiplication Facts
Quiz
•
5th Grade
10 questions
The Best Christmas Pageant Ever Chapters 1 & 2
Quiz
•
4th Grade
12 questions
Unit 4 Review Day
Quiz
•
3rd 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
Discover more resources for Science
10 questions
Exploring the Energy Cycle: Photosynthesis and Cellular Respiration
Interactive video
•
6th - 10th Grade
10 questions
Exploring Plate Tectonics and Their Boundaries
Interactive video
•
6th - 10th Grade
10 questions
Exploring Light and Waves Concepts
Interactive video
•
6th - 10th Grade
10 questions
EOC Domain 3: Taxonomy
Lesson
•
9th - 10th Grade
9 questions
EOC Domain 4: Evolution
Lesson
•
9th - 10th Grade
10 questions
EOC Domain 5: Ecology
Lesson
•
9th - 10th Grade
11 questions
EOC Domain 2: Genetics
Lesson
•
9th - 10th Grade
10 questions
Exploring the Human Respiratory System
Interactive video
•
6th - 10th Grade
