
Câu lệnh lặp FOR trong Python
Quiz
•
Computers
•
10th Grade
•
Practice Problem
•
Hard
HUỲNH NHƯ
FREE Resource
Enhance your content in a minute
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, cú pháp nào để lặp qua các số từ 0 đến 9?
for i in range(1,10)
for i in range(0,10)
for i in range(0,9)
for i in range(10,11)
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh range(3, 8) trả về dãy số nào?
3, 4, 5, 6, 7
3, 4, 5, 6, 7, 8
4, 5, 6, 7, 8
3, 4, 5, 6, 7, 8, 9
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Giá trị của biến S sau đoạn code sau là bao nhiêu? S = 0 for k in range(5): S += k print(S)
10
15
5
0
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Để in tất cả các số chẵn nhỏ hơn n, ta cần điều kiện nào?
i % 2 == 1
i % 2 == 0
i % 3 == 0
i % 5 == 0
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Lệnh range(1, n+1) trả về dãy số nào?
Từ 1 đến n
Từ 1 đến n+1
Từ 0 đến n
Từ 0 đến n-1
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Chức năng chính của lệnh for trong Python là gì?
Dùng để lặp lại một đoạn chương trình
Dùng để nhập dữ liệu
Dùng để kết thúc chương trình
Dùng để khai báo biến
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Kết quả in ra của đoạn mã sau là gì? for i in range(2, 7): print(i, end=" ")
2 3 4 5 6
2 3 4 5 6 7
3 4 5 6 7
3 4 5 6
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
PARTS OF MOTHERBOARD
Quiz
•
10th Grade
15 questions
Code.org Lesson 1-14
Quiz
•
9th - 12th Grade
14 questions
BÀI 14- THUẬT TOÁN TÌM KIẾM TUẦN TỰ
Quiz
•
6th Grade - University
11 questions
Câu hỏi ôn tập HKII_Tin học 6
Quiz
•
8th Grade - Professio...
10 questions
BÀI 8. SẮP XẾP VÀ LỌC DỮ LIỆU
Quiz
•
1st - 12th Grade
14 questions
C++ - Loops and Random Numbers
Quiz
•
9th - 12th Grade
10 questions
Программирование алгоритма 8 класс
Quiz
•
1st - 10th Grade
15 questions
Unbound Report Quiz
Quiz
•
9th - 12th 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
