Advertisement
Guest User

Untitled

a guest
Apr 21st, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. import time
  2. import sys
  3. hour=0
  4. minute=0
  5. second=0
  6.  
  7. while True:
  8. print(str(hour)+":"+str(minute)+":"+str(second))
  9. time.sleep(1)
  10. second=second+1
  11. if second==60:
  12. minute=minute+1
  13. second=0
  14. if minute==60:
  15. hour=hour+1
  16. minute=0
  17. if hour==25:
  18. hour=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement