#  File       :	handshake.py
#  Purpose    :	Write a program that will take a decimal number, and
#               convert it to the sequence of events for a secret handshake.
#  Programmer : Amal Shehu
#  Course     :	Exercism
#  Date       :	Monday 3 October 2016, 12:50 AM


def handshake(num):
    if len(converter(num)) > 6:
        raise AssertionError


    return num


def converter(num):
    if num == 0:
        return ''
    else:
        return converter(num/2) + str(num % 2)


def bin_converter(inp):
    r = 0
    for character in inp:
        if character == '0':
            r = r * 2
        elif character == '1':
            r = r * 2 + 1
        else:
            raise BinaryError()
    return r

print (bin_converter('1000'))

@@ -9,16 +9,23 @@
       :%09
+secret_
 handshak
@@ -29,16 +29,16 @@
 hake.py%0A
-
 #  Purpo
@@ -276,16 +276,136 @@
 :50 AM%0A%0A
+actions = %7B1: 'wink',%0A           2: 'double blink',%0A           4: 'close your eyes',%0A           8: 'jump'%0A           %7D%0A%0A
 %0Adef han
@@ -478,18 +478,16 @@
 onError%0A
-%0A%0A
     retu
@@ -848,27 +848,13 @@
 nt (
-bin_converter('1000')
+actions
 )%0A

Add actions