日期:2024-05-30
浙江省余姚重点中学2022-2023学年高一下学期信息技术期中考试试卷试题详情
有如下Python程序段:
a=[9,5,2,3,0,-9,5,0,7,-10] s,i=0,0
while a[i]!=0 and i<len(a) :
s+=1
i+=1
运行该程序后s的值为( )
- A、4
- B、5
- C、8
- D、10
a=[9,5,2,3,0,-9,5,0,7,-10] s,i=0,0
while a[i]!=0 and i<len(a) :
s+=1
i+=1
运行该程序后s的值为( )