pilot icon indicating copy to clipboard operation
pilot copied to clipboard

异常处理章节第一个例题,运行结果如下,接着再运行就运行不了了,会出现*,其他章节能正常运算

Open xingzou-huang opened this issue 4 years ago • 2 comments

*while True: try: x = int(input('Please enter a number: ')) break except ValueError: print('Not a valid number. Try again...')

print('Your number is:', x)

Please enter a number: 7

xingzou-huang avatar Jul 12 '20 04:07 xingzou-huang

提示你输入的时候输入,然后回车,程序才会继续运行。

neolee avatar Jul 12 '20 04:07 neolee

image 我重新演绎了你的情况,你看图片是不是一样的问题,只需要将上一次input互动完毕就OK了, 可以输入enter,或者ctrl+enter

feifanruwo avatar Jul 12 '20 08:07 feifanruwo