python 循环练习

# 1.用循环实现下列计算:
#
# 打印出1-100中所有奇数;
# for i in range(1,101,2):
# print(i)
# count = 1
# while count<=100 : # print(count) # count+=2 # 计算1-100之间所有整数的和; # sum = 0 # for i in range(1,101): # sum = sum + i # print(sum) # sum = 0 # count = 0 # while count<=100: # sum = sum + count # count +=1 # print(sum) # 计算1-100之间所有奇数的和; # sum = 0 # for i in range(1,101,2): # sum = sum + i # print(sum) # sum=0 # count = 1 # while count<=100 : # sum=sum+count

python 循环练习最先出现在Python成神之路

版权声明:
作者:感冒的梵高
链接:https://www.techfm.club/p/7499.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>