Make a working digital clock with ascii numbers

2

The challenge is make a digital clock that exhibits ascii numbers in a 24-hour format like:

 _   _     _   _ 
|_| |_| . |_| |_|
|_| |_| . |_| |_|

or

 _   _         _ 
 _|  _| . |_| |_ 
|_   _| .   |  _|

and updates the screen every 1 minute (or every 1 second, for praticity reasons). It must reset to 00:00 after 23:59.

David Sousa

Posted 2014-12-09T18:55:24.797

Reputation: 131

Question was closed 2014-12-09T20:39:14.583

1Very closely related. – Martin Ender – 2014-12-09T18:58:58.503

3Even more closely related: I would vote to close as a dupe if I didn't have superpowers. – Peter Taylor – 2014-12-09T19:02:00.613

I think, clock with timer aren't the same as any number. – Qwertiy – 2014-12-09T21:44:05.637

Answers

0

Python, 411 408 chars

import time,os
s=" ";p=".";a=s*3;b=" _ ";c="|_|";d="| |";e="|  ";f="  |";g="|_ ";h=" _|";P=[s,p,p]
z=[[b,d,c],[a,f,f],[b,h,g],[b,h,h],[a,c,f],[b,g,h],[b,g,c],[b,f,f],[b,c,c],[b,c,h]]
A=range(10);B=A[:6];C=A[:3]
while 1:
 for i in C:
  for j in A:
   if i==2&(j==4):break
   for k in B:
    for l in A:
     for m in C:
      print z[i][m]+s+z[j][m]+P[m]+z[k][m]+z[l][m]
     time.sleep(1);os.system('clear')

Not so pretty but working.

David Sousa

Posted 2014-12-09T18:55:24.797

Reputation: 131