Alexa Metrics

Coding Adventure 4: Secure Communication

Let's go to the moon, back and forth

learn about advanced loops, arrays and functions while you launch a rocket to the moon

免費加入

描述

During space missions, it is important to have secure communication. We can do this by hiding messages through encryption. Help Robo construct the message and hide it. Robo will use simple methods taught by the base station on Earth.

預覽視頻

任務

Hidden message in first letter

The base station on Earth sends messages to astronauts in space. In order to keep messages safe from spies, the message is hidden. One simple method is to hide the first letter of each word that is received. Read the word under each dish and decipher the hidden message from the first letter of each word. Lastly, print the constructed message onto the screen.

For example: If the words are "mercury", "arm", and "year". The first letters will be the letters placed between brackets "(m)ercury", "(a)rm", and "(y)ear". So the constructed message will be "may".

Hidden message in second letter

The message is now hidden in the second letter of each word received from the base station. Read the word under each dish and decipher the hidden message from the second letter of each word. Print the constructed message onto the screen.

Hidden message in last letter

Now, the message is hidden in the last letter of each word. Read the word under each dish and decipher the hidden message from the last letter of each word. Remember to print the constructed message onto the screen.

Hidden message in the second last letter

This time, the message is hidden in the second last letter. Read the word and decipher the hidden message from the letter. Print the constructed message onto the screen.

Hidden message in middle letter

The message is hidden in the middle letter of each word. Read the word, decipher the hidden message, and print the constructed message onto the screen.

Note that all words have odd length, and to get the middle letter use the following relation: (text length / 2) + 1.

Let's go to the moon, back and forth

learn about advanced loops, arrays and functions while you launch a rocket to the moon

免費加入
Canada Flag 隱私政策使 使用條款
Got an invite