Search Header Logo

Bài 20. Câu lệnh lặp for

Authored by Nguyễn Thị Trang

Computers

10th Grade

Used 7+ times

Bài 20. Câu lệnh lặp for
AI

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

Media Image

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

Media Image

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?

1
2
Tất cả đều sai

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

Cho các câu lệnh sau, hãy chỉ ra câu lệnh đúng:

x = 0 for i in range(10): x = x + 1
x = 0 for i in range(10): x:= x + 1
x = 0 for i in range(10) x = x + 1
x:= 0 for i in range(10): x = x + 1

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

Media Image

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?

10 lần.
1 lần.
5 lần.
Không thực hiện.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Media Image

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?

10 lần.
1 lần.
5 lần.
Không thực 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?

10
12
15
14

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?