test1=1
while test1:
print("查询能量来源!退出程序请输入0")
print("能量来源如下:1=生活缴费 2=行走捐 3=共享单车 4=线下支付 5=网络购票")
number=input("输入数字\n")
if number=="0":
print("已退出!")
test1=0
elif number=="1":
print("150g")
elif number=="2":
print("200g")
elif number=="3":
print("210g")
elif number=="4":
print("250g")
else:
print("输入数字错误")
查询能量来源!退出程序请输入0
能量来源如下:1=生活缴费 2=行走捐 3=共享单车 4=线下支付 5=网络购票
输入数字
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.6/dist-packages/ybckit/runner.py", line 81, in <module>
exec(open(script_file, 'rb').read())
File "<string>", line 9, in <module>
EOFError: EOF when reading a line
======== 程序未正确结束 (错误代码 1) ========