Reputation: 13
def clock():
import time
m = 0
s = 0
while(True):
if((m<60) and (s<60)): print(m,":",s)
elif(s==60):
s == -1
m += 1
elif(m==60):
print("It's been 1 hour m8")
break
s += 1
time.sleep(1)
Result is, it counts until 0:59 then stops. It suppose to go until 59.59. I want to understand the fundemantal looping mistake which i did in here, thanks.
Upvotes: 0
Views: 56