学习 python 时 , 看到range函数 就写了这么一个
coding = utf-8
import time
import sys
count = 0
m = 0
mm = 0
h = 0
hh =0
while True:
for i in range(0,11):
if i < 10:
time.sleep(1)
sys.stdout.write(“\r%s%s:%s%s:%s%s” %(hh,h,mm,m,count,i))
sys.stdout.flush()
else :
if i == 10:
count +=1
if count == 6:
m +=1
if m ==10:
mm +=1
if mm == 6:
h +=1
if h == 10:
hh +=1
h = 0
else :
if hh ==2 and h == 4:
print “The second day has come!! welcome to you !! ”
count = 0
m = 0
mm = 0
h = 0
hh = 0
break
mm = 0
m = 0
count = 0
continue