大橙子网站建设,新征程启航
为企业提供网站建设、域名注册、服务器等服务
自我学习记录:如有问题,请帮助指正,勿喷。
创新互联网络公司拥有10多年的成都网站开发建设经验,1000+客户的共同信赖。提供网站设计、网站制作、网站开发、网站定制、买链接、建网站、网站搭建、成都响应式网站建设公司、网页设计师打造企业风格,提供周到的售前咨询和贴心的售后服务
print(1+2+3+4)
names=('Sam','Max','Leo')
for name in names:
print(name)
sum = 0
for x in (1,2,3,4,5,6,7,8,9,10):
sum =sum + x
print(sum)
print(list(range(100)))
sum = 0
n = 99
while n > 0:
sum = sum +n
n = n - 2
print(sum)
sum = 0
n = 99
while n > 0:
break
sum = sum +n
n = n - 2
print(sum,'break 跳出当前循环')
sum = 2
n = 99
s = 100
while n > 0:
sum = sum +n
n = n - 2
continue
s = 0
print('%d %d %d'%(sum,s,n))
n = 0
sum = 0
res = 0
while (n <=50):
res = (res+ n )
n = n + 1
print(res)
n=60
while (n<=100):
sum = (sum + n)
n = n + 1
sum=sum+res
print(sum)
n = 0
sum =0
res = 0
while n<=100:
sum = (sum +n)
n = n + 1
print(sum)
print(n)
n = 51
while n >50 and n <60:
res = (res + n)
n = n + 1
print(res)
print(sum - res)
n=0
sum=0
res=0
while n<=100:
if n <= 50:
res=(res + n)
n=n+1
elif (n>50 and n<60) :
n=n+1
continue
else :
sum=sum+n
n=n+1
print(res)
print(sum+res)
**