Search Header Logo

Python_Cấu trúc lặp

Authored by Trần Thị Kim Dung

Education

9th - 12th Grade

Used 1+ times

Python_Cấu trúc lặp
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

78 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Kết qủa của đoạn lệnh sau là gì?

x=sum(range(5))

print(x)

4

5

10

15

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Giá trị của a sau khi kết thúc vòng lặp là bao nhiêu:

a=0

for i in range(10,14): a=a+3

9

12

15

18

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Vòng lặp nào trả về kết quả dưới đây?

11111

22222

33333

44444

55555

for i in range(1,6):

print(i, i, i, i, i)

for i in range(1,5):

print(str(i)*5)

for i in range(1, 6):

print(str(i) * 5)

for i in range(0, 5):

print(str(i) * 5)

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Hàm range() để làm gì?

Tạo ra một dãy số liên tiếp, bắt đầu từ số 0

Tạo ra một dãy số liên tiếp, bắt đầu từ số 1

Dùng để sắp xếp một dãy số theo chiều tăng dần

Dùng để sắp xếp một dãy số theo chiều giảm dần

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Cú pháp đầy đủ của hàm range()

range(start,stop,step)

range(start,step)

range(stop,step)

range(0,stop,step)

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Trong hàm range, nếu không đặt khoảng cách giữa hai số thì Python sẽ hiểu mặc địch nó bằng:

1

0

2

3

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Hàm range(101) sẽ tạo ra:

Một dãy số từ 0 đến 100

Một dãy số ngẫu nhiên 101

Một dãy số từ 1 đến 101

101 số ngẫu nhiên

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?