
Bài 20. Câu lệnh lặp for
Authored by Nguyễn Thị Trang
Computers
10th Grade
Used 7+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cú pháp của lệnh lặp với số lần biết trước?
for <i> in range(n):
<khối lệnh>;
for <i> in range(n):
<khối lệnh>:
for <i> in range(n):
<khối lệnh>.
for <i> in range(n):
<khối lệnh>
Answer explanation
Jupiter is a gas giant made primarily of hydrogen and helium. Unlike terrestrial planets that have solid surfaces, gas giants like Jupiter don't have a well-defined solid surface, allowing them to accumulate more mass in a gaseous form. This composition has allowed Jupiter to grow significantly larger than planets with solid surfaces.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Biến chạy trong vòng lặp for i in range(<giá trị cuối>) tăng lên mấy đơn vị sau mỗi lần lặp?
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho các câu lệnh sau, hãy chỉ ra câu lệnh đúng:
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong Python, câu lệnh nào dưới đây được viết đúng để in ra kí tự A?
for i in range(10): prin(“A”)
for i in range(10): print(“A”)
for i in range(10): print(A)
for i in range(10) print(“A”)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong câu lệnh lặp trên, khi kết thúc câu lệnh trên, câu lệnh print(j) được thực hiện bao nhiêu lần?
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Trong câu lệnh lặp trên, khi kết thúc câu lệnh trên lệnh có bao nhiêu chữ “A” xuất hiện?
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Cho đoạn chương trình:
j = 0
for i in range(5):
j = j + i
print(j)
Sau khi thực hiện chương trình giá trị của biến j bằng bao nhiêu?
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?