Your task is to convert a number between 1 and 31 to a sequence of actions in the secret handshake.
The sequence of actions is chosen by looking at the rightmost five digits of the number once it's been converted to binary. Start at the right-most digit and move left.
The actions for each number place are:
00001 = wink
00010 = double blink
00100 = close your eyes
01000 = jump
10000 = Reverse the order of the operations in the secret handshake.Let's use the number 9 as an example:
1001.wink.That was the last digit, so the final code is:
wink, jumpGiven the number 26, which is 11010 in binary, we get the following actions:
The secret handshake for 26 is therefore:
jump, double blinkIf you aren't sure what binary is or how it works, check out this binary tutorial.
Your task is to convert a number between 1 and 31 to a sequence of actions in the secret handshake.
The sequence of actions is chosen by looking at the rightmost five digits of the number once it's been converted to binary. Start at the right-most digit and move left.
The actions for each number place are:
00001 = wink
00010 = double blink
00100 = close your eyes
01000 = jump
10000 = Reverse the order of the operations in the secret handshake.Let's use the number 9 as an example:
1001.wink.That was the last digit, so the final code is:
wink, jumpGiven the number 26, which is 11010 in binary, we get the following actions:
The secret handshake for 26 is therefore:
jump, double blinkIf you aren't sure what binary is or how it works, check out this binary tutorial.