15 câu trắc nghiệm Tin học 10 Kết nối tri thức Bài 30 có đáp án

Chương trình sau bị lỗi ở dòng lệnh thứ bao nhiêu ? >>> fruits = ['Banana', 'Apple', 'Lime'] >>> loud_fruits = [fruit.upper() for fruit in fruits] >>> print(loud_fruits) >>> list(enumerate(fr

7/15

Chương trình sau bị lỗi ở dòng lệnh thứ bao nhiêu ?

>>> fruits = ['Banana', 'Apple', 'Lime']

>>> loud_fruits = [fruit.upper() for fruit in fruits]

>>> print(loud_fruits)

>>> list(enumerate(fruits))

2.

3.

4.

Không phát sinh lỗi

Giải thích

Đáp án đúng là: D

Chương trình đúng không có lỗi.

Chương trình sau bị lỗi ở dòng lệnh thứ bao nhiêu ? >>> fruits = ['Banana', 'Apple', 'Lime'] >>> loud_fruits = [fruit.upper() for fruit in fruits] >>> print(loud_fruits) >>> list(enumerate(fruits))   (ảnh 1)