
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
Spoljna memorija - HDD
Quiz
•
9th - 11th Grade
15 questions
Tin 10 bài 1
Quiz
•
10th Grade
12 questions
Google Classroom
Quiz
•
7th Grade - University
10 questions
Working with tables
Quiz
•
5th - 12th Grade
10 questions
TIN 10 - BÀI 4
Quiz
•
10th - 11th Grade
15 questions
Ôn tập kỳ 2 tin 6
Quiz
•
1st - 12th Grade
15 questions
Chapter 3: Storage devices and media (Part 2):
Quiz
•
10th - 11th Grade
11 questions
What is a computer
Quiz
•
KG - University
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
