Discuss / Python / 循环

循环

Topic source

en归隐

#1 Created at ... [Delete] [Delete and Lock User]

print('很多人以为直到失去你才知道拥有过什么,而事实上,\ 你一直知道你拥有什么,只是你以为你永远不会失去\n')

sum=0 for x in list(range(6)): print('hello:',x,'!\n') sum+=x print('求和的值是:',sum)

add=0 b=0 while b<11: add=add+b b=b+2 if b<11: print(b) else: break print('11以内偶数的和是:',add)


  • 1

Reply