
Câu lệnh lặp FOR trong Python

Quiz
•
Computers
•
10th Grade
•
Hard
Huỳnh CT2
FREE Resource
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
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
ÔN TẬP KIẾN THỨC XÂU KÍ TỰ

Quiz
•
9th - 12th Grade
10 questions
Tom & Jerry

Quiz
•
1st - 11th Grade
5 questions
Tin 10_CĐ5_Bài 24. Xâu kí tự

Quiz
•
10th Grade
15 questions
Bài 20. Câu lệnh lặp for

Quiz
•
10th Grade
15 questions
ÔN TẬP SCRATCH

Quiz
•
10th Grade
10 questions
Ai nhanh hơn For-do

Quiz
•
5th Grade - University
10 questions
Trắc nghiệm: Bài 18-Các lệnh vào ra đơn giản

Quiz
•
10th Grade
10 questions
TIN 10_B22_LIST

Quiz
•
10th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
10 questions
UPDATED FOREST Kindness 9-22

Lesson
•
9th - 12th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
20 questions
US Constitution Quiz

Quiz
•
11th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
Analog vs Digital

Quiz
•
9th - 12th Grade
10 questions
Exploring Cybersecurity Techniques and Threats

Interactive video
•
6th - 10th Grade
10 questions
Understanding the Internet and Data Transmission

Interactive video
•
7th - 12th Grade