【发布时间】:2014-05-03 15:02:46
【问题描述】:
#!/usr/bin/python
import time
a = 0
if a == 5:
print"Congrats you hit five!"
while a <10:
a = a + 1
print a
time.sleep(.5)
所以我的程序数到十没问题。但是当 a == 5 时它从不显示文本。 有任何想法吗?这是我第一次尝试python。
【问题讨论】:
标签: python if-statement printing while-loop