Python语言计算1+2+3+4,用while循环for循环分别实现
Python语言计算1+2+3+4,用while循环for循环分别实现
Python语言计算1+2+3+4,用while循环for循环分别实现
Python语言计算1+2+3+4,用while循环for循环分别实现
while循环
count = 0;
t=1;
while t < 5 :
count = count + t;
t=t+1;
print 'count:', count
for循环
count = 0;
range=[1,2,3,4];
for i in range:
count=count + i;
print 'count:', count