下面代码的输出结果是 a=[] for i in range(2,10): count=0 for x in range(2,i一1): if i%x==0: count+=1 if count!=0: a.append(i) print(a)

admin2019-09-02  12

问题 下面代码的输出结果是
a=[]
for i in range(2,10):
count=0
for x in range(2,i一1):
if i%x==0:
count+=1
if count!=0:
a.append(i)
print(a)

选项 A、[3,5,7,9]
B、[4,6,8,9,10]
C、[2,3,5,7]
D、[4,6,8,9]

答案D

解析
转载请注明原文地址:https://kaotiyun.com/show/436p777K
0

相关试题推荐
最新回复(0)