第27632题 单选题
下列代码片段中,能够正确统计列表`nums = [12, 5, 8, 23, 17, 3, 41]`中大于1的元素总个数的是?
A
count = 
for num in nums:
    if num > 1:
        count += 1
print(count)
B
count = 
for num in nums:
    if num > 1:
        count
print(count)
C
count = 
for num in nums:
    if num > 1:
        count *= 1
print(count)
D
for num in nums:
    if num > 1:
        count += 1
print(count)
程序运行统计
暂无判题统计
提交0次 正确率0.00%
答案解析