发布时间:2019-08-16 10:57:15编辑:auto阅读(2138)
python 添加中文注释时出现运行失败。需要在顶部设置编码。
# coding=UTF-8
'''
Created on 2013-8-28
@author: xmyj-0210
'''
number = 23
running = True
#while 开始
while running:
guess = int(raw_input('Enter an integer:'))
if guess == number:
print 'Congratulations,you guessed it.'
running = False
elif guess < number:
print 'No,it is a little higher than that'
else:
print 'No,it is a little lower than that'
#while 结束
print 'Done'
上一篇: python 处理excel文件
下一篇: python logging简单使用
51284
50736
41334
38144
32611
29514
28364
23233
23201
21526
1597°
2329°
1931°
1873°
2201°
1914°
2601°
4369°
4215°
2992°