Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- import time
- def cls():
- os.system('cls')
- def clock():
- year = 2017
- month = 01
- day = 01
- hour = 00
- minute = 00
- second = 00
- while True:
- print ("The test is: %02d" % year + ":%02d" % month + ":%02d" % day + ":%02d" % hour + ":%02d" % minute + ":%02d" % second)
- cls()
- second += 1
- if second == 60:
- minute += 1
- second = 00
- if minute == 60:
- hour += 1
- minute = 00
- if hour == 24:
- day += 1
- hour = 00
- if day == 32:
- month += 1
- day = 01
- if month == 13:
- year += 1
- month = 01
- if __name__ == "__main__":
- clock()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement