myList = [1, 5, 5, 5, 5, 1] max = myList[0] indexOfMax = 0 for i in range(1, len(myList)): if myList > max: max = myList indexOfMax = i print(indexOfMax) Đâu là kết quả của đoạn code dưới đây?

myList = [1, 5, 5, 5, 5, 1]

max = myList[0]

indexOfMax = 0

for i in range(1, len(myList)):

if myList > max:

max = myList

indexOfMax = i

print(indexOfMax)

Đâu là kết quả của đoạn code dưới đây?

A. 0

B. 4

C. 1

D. 5

Hướng dẫn

Chọn C là đáp án đúng

 

Thư viện tài liệu12 Tháng bảy, 2023 @ 2:28 chiều

Đánh giá chủ đề này
How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site