Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
I have always wanted to have such a clock solution in Clear category for Morse Clock by Vulwsztyn
def prz(l,q,o):
for i in range(q+1):
if l>=10**q:
o+='-'
else:
o+='.'
l=l%10**q
l*=10
return o
def checkio(time):
time=time.replace(':'," ")
o=''
j=0
for liczba in time.split():
liczba=int(liczba)
l1=liczba//10
l2=liczba%10
l1=int(bin(l1)[2:])
l2=int(bin(l2)[2:])
print(l1,l2)
if j==0:
q=1
else:
q=2
o=prz(l1,q,o)
o+=' '
q=3
o=prz(l2,q,o)
j+=1
if j<3:
o+=' : '
return o
Oct. 31, 2016