Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. import os
  2. import time
  3.  
  4. def cls():
  5. os.system('cls')
  6.  
  7. def clock():
  8. year = 2017
  9. month = 01
  10. day = 01
  11. hour = 00
  12. minute = 00
  13. second = 00
  14.  
  15. while True:
  16. print ("The test is: %02d" % year + ":%02d" % month + ":%02d" % day + ":%02d" % hour + ":%02d" % minute + ":%02d" % second)
  17.  
  18. cls()
  19. second += 1
  20. if second == 60:
  21. minute += 1
  22. second = 00
  23. if minute == 60:
  24. hour += 1
  25. minute = 00
  26. if hour == 24:
  27. day += 1
  28. hour = 00
  29. if day == 32:
  30. month += 1
  31. day = 01
  32. if month == 13:
  33. year += 1
  34. month = 01
  35.  
  36. if __name__ == "__main__":
  37. clock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement