Visual illustration of the code challenge: Greenoïd #1 - An unexpected encounter

Greenoïd #1 - An unexpected encounter

With your friends Hazel and Ash, you happen to come across an old robot…
Coding in the sandbox You must be logged in to access the sandbox.

Mission

As you wander through this forgotten land, littered with roots and weeds, Ash stumbles over a piece of metal. On closer inspection, you realize it's an old robot.

Apparently broken, it's covered in moss and almost completely stuck in brambles. You carefully remove it from its prison of thorns and begin to examine it as if it were a priceless treasure.

On the strange machine's rusty torso, there's a small control screen and an engraved word: “AURA”. This reminds you of a legend you were told as a child, about a goddess named Aura who created Greenoid at the beginning of the world…

You turn the little robot over. On its back is a serial number 7124439656724113 and two buttons. Is it possible to turn on this old machine, which seems to have come straight out of another age?

Rules

The serial number is a sequence of digits between 1 and 9.

You assume that if it's an even number, you press the right button. And if it's an odd number, press the left button.

An “L” (Left) corresponds to pressing the left button.

An “R” (Right) corresponds to pressing the right button.

By analyzing the serial number, you need to return the sequence that should enable you to switch the robot back on, e.g. “LLRRLRLRLLRR”.

Solve the challenge

To code this challenge, several possibilities:
- Want to start coding right away? Use the online Sandbox.
- Want to work in your favorite editor? Organize your code well, test, check out our API documentation.
- You can also copy/paste a dataset below.

challenge code for resolution via API: GREENOID_1

Some resources to help you:
Data and algorithmic logic Methodologies Corrections

Support for resolution

Progress through challenges using our resolution aids: tools, techniques and advice to help you overcome the most complex programming challenges with methodology, confidence and creativity.

Dataset and algorithmic logic

Based on the data and the expected response, use the process to determine the logic to implement.

Show data and progress

Methodologies

Develop a structured approach with our solving guides. Work on specific concepts such as object-oriented programming or unit testing to improve your coding style and progress.

No methodology yet for this challenge, but we are working on it! Follow us to be informed of the release!


Corrections

The corrections allow you to discover certain technical concepts but will also give you a solution to the challenge. Code the challenge yourself before consulting the corrections ;)

Programming concept(s) that can be used to solve this challenge: Conditions

Keep coding

Other challenges to complete

Intermediate
Wade Wilson part en mission !

Wade Wilson part en mission !

Une base militaire à attaquer ? Aucun problème pour Deadpool, c’est plutôt une invitation à bien rigoler !

Behavioral Proposed methodology
Intermediate
STARSHIP #2 : Attention aux météorites !

STARSHIP #2 : Attention aux météorites !

Une pluie de météorites approche… Ton vaisseau aura t-il assez d’énergie pour le traverser sans encombre ?

Behavioral
Beginner
Affaire BL4CKWELL – Comte Vermillon

Affaire BL4CKWELL – Comte Vermillon

Décrypte un message falsifié mot à mot et traque les manipulations invisibles.

Behavioral Corrigé disponible : PHP