Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Morse Clock by xianzhi.sun
def checkio(time_string):
binary=[int(x) for x in time_string.split(':')]
(h0, h1), (m0, m1), (s0, s1) = [(n // 10, n % 10) for n in binary]
morse_clock = '{:02b} {:04b} : {:03b} {:04b} : {:03b} {:04b}'.format(h0,h1,m0,m1,s0,s1)
return str(morse_clock).replace('0', '.').replace('1', '-')
Oct. 25, 2016
Comments: