自我學(xué)習(xí)記錄:如有問(wèn)題,請(qǐng)幫助指正,勿噴。
創(chuàng)新互聯(lián)網(wǎng)絡(luò)公司擁有10多年的成都網(wǎng)站開(kāi)發(fā)建設(shè)經(jīng)驗(yàn),1000+客戶的共同信賴。提供網(wǎng)站設(shè)計(jì)、網(wǎng)站制作、網(wǎng)站開(kāi)發(fā)、網(wǎng)站定制、買鏈接、建網(wǎng)站、網(wǎng)站搭建、成都響應(yīng)式網(wǎng)站建設(shè)公司、網(wǎng)頁(yè)設(shè)計(jì)師打造企業(yè)風(fēng)格,提供周到的售前咨詢和貼心的售后服務(wù)
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 跳出當(dāng)前循環(huán)')
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)
**