Discuss / Python / 求解答:为什么我的电脑上没办法执行死循环

求解答:为什么我的电脑上没办法执行死循环

Topic source

你在眉梢

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

-- coding: utf-8 --

n=1 while n>0: sum=n+1 print(sum)

死循环在我电脑上执行是直接变成了: — 然后什么都不显示,不知道大家是不是这样的。

RushHell

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

最后一行缩进要与倒数第二行一样, print () 不在循环里


  • 1

Reply