PY
py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from datetime import datetime
from itertools import cycle
nums = {'0': {8: '○', 4: '○', 2: '○', 1: '○'},
'1': {8: '○', 4: '○', 2: '○', 1: '●'},
'2': {8: '○', 4: '○', 2: '●', 1: '○'},
'3': {8: '○', 4: '○', 2: '●', 1: '●'},
'4': {8: '○', 4: '●', 2: '○', 1: '○'},
'5': {8: '○', 4: '●', 2: '○', 1: '●'},
'6': {8: '○', 4: '●', 2: '●', 1: '○'},
'7': {8: '○', 4: '●', 2: '●', 1: '●'},
'8': {8: '●', 4: '○', 2: '○', 1: '○'},
'9': {8: '●', 4: '○', 2: '○', 1: '●'}}
now = datetime.now()
hour = str(now.hour).zfill(2)
minute = str(now.minute).zfill(2)
second = str(now.second).zfill(2)
ptime = cycle(hour + minute + second)
print(f'System time: {hour}:{minute}:{second}')
print('Time in binary format.')
for i in range(4):
for j in range(6):
ch = next(ptime)
code = list(nums[ch].values())
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run