欧美一区二区三区,国内熟女精品熟女A片视频小说,日本av网,小鲜肉男男GAY做受XXX网站

利用for循環(huán)和while循環(huán)求n

利用for循環(huán)和while循環(huán)求n?

xStart=raw_input("please enter the int number:")

xInt= int(xStart)

count=0

while not xInt==count:

count +=1

print count #你輸入多少就從1顯示到這個(gè)數(shù)

還有就是求和:

xStart=raw_input("please enter the int number:")

xInt= int(xStart)

count= 0

sum= 0

while not xInt == count:

count += 1

sum += count

print sum

#這里顯示的sum是如果你要輸入數(shù)值5,則顯示sum=1+2+3+4+5的值.