The Prison Break | Think Like A Coder, Ep 1

Alphabets Sounds Video

share us on:

In “The Prison Break Adventure,” Ethic wakes up in a prison cell with no memory of how she got there, and with the help of a mysterious figure named Hedge, they devise a plan to escape using precise instructions and programming concepts like loops. By employing a loop to efficiently test the prison locks, they successfully unlock their cell and make their escape, only to discover that Ethic must now confront a larger challenge: collecting powerful artifacts to restore order in a world threatened by a robot takeover.

The Prison Break Adventure

Imagine waking up and finding yourself in a strange place with no memory of how you got there. That’s exactly what happened to Ethic. She suddenly finds herself in a prison cell, can’t remember anything, and sees a mysterious person named Hedge trying to squeeze through the bars of her window. Hedge is there to help Ethic escape and save the world, but first, they need to break out of jail.

The Mysterious Locks

Hedge explains that the prison locks are special. Each lock has a red dial inside the keyhole that can be turned to one of 100 positions, numbered 1 through 100. The right key will turn the dial to the correct position, turning the light green and unlocking the door. Since stealing keys from a guard isn’t an option, Hedge has a clever plan. He can follow Ethic’s specific instructions. For example, if Ethic tells him to walk 5 steps forward, turn right, and then walk another 5 steps, he will do exactly that. But she needs to be precise; vague commands like “pick the lock” or “try every combination” won’t work. A clear command like “spin the dial 5 positions forward” will.

Planning the Escape

Once they escape the cell, they have only a short time to unlock the outer prison door before the guards arrive. Ethic needs a smart plan to help Hedge open any door quickly. A useful programming idea for this is called a loop. A loop is a set of instructions that can be repeated a certain number of times or until something specific happens.

Using Loops to Unlock the Door

The goal is to find a way for Hedge to try every combination until one works. A simple solution is to have Hedge try each position in order: check position 1, and if it doesn’t work, move to position 2, and so on, up to 100. But writing over 100 lines of instructions is not efficient. Instead, a loop can make this easier.

Ethic could tell Hedge to check the dial’s color, then spin the dial forward one position, repeating this for 100 times. This is called a “for” loop. An even smarter way is to have Hedge spin the dial one position at a time until it turns green, then stop and unlock the door. This is called an “until” loop, as it continues until a specific condition is met. Another option is a “while” loop, where Hedge turns the dial while it remains red and stops when it turns green.

The Great Escape

Back to the adventure, Hedge uses the loop to try the combinations, and the cell unlocks at position 41. Ethic and Hedge wait for the right moment when the guards are not looking and make their escape. Soon, Ethic has to make a choice: hide inside a mysterious crystal or try to unlock the outer door and run for it. Ethic decides to run.

The second door takes Hedge longer to unlock, requiring him to spin all the way to position 93. Once he succeeds, he explains to Ethic why he rescued her: the world is in chaos because of a robot takeover, and only Ethic can fix it. To do this, they must collect three powerful artifacts that are being misused across the land. Only then can Ethic return to the world machine—a giant crystal—to set things right. Ethic may have escaped the prison, but now she faces a big challenge ahead.

  1. What emotions did you experience while reading about Ethic’s sudden awakening in a prison cell with no memory? How do you think you would react in a similar situation?
  2. Reflect on the role of Hedge in the story. What qualities make Hedge an effective ally for Ethic, and how do these qualities contribute to their escape plan?
  3. Consider the concept of the mysterious locks with 100 positions. How does this challenge relate to problem-solving in real life, and what strategies would you employ to tackle such a problem?
  4. Discuss the importance of precise communication in the context of Ethic giving instructions to Hedge. How does this apply to teamwork and collaboration in your own experiences?
  5. Explore the use of loops in the escape plan. How does understanding programming concepts like loops enhance problem-solving skills in everyday situations?
  6. Reflect on the decision Ethic makes to run for the outer door rather than hiding. What factors do you think influenced her decision, and how do you approach decision-making in high-pressure situations?
  7. What are your thoughts on the revelation that Ethic must save the world from a robot takeover? How does this twist impact your perception of the story and Ethic’s character development?
  8. Consider the theme of responsibility and destiny as Ethic learns about her role in fixing the world. How do you relate to the idea of having a purpose or mission in life, and how does it shape your actions and decisions?
  1. Design Your Own Escape Plan

    Imagine you are in Ethic’s shoes. Create a detailed escape plan using clear and precise instructions. Write down each step you would take to escape the prison, just like Ethic had to do for Hedge. Remember to be specific with your commands!

  2. Lock Combination Challenge

    Using a paper dial numbered 1 to 100, simulate the process of unlocking the prison door. Practice using loops by writing a “for” loop and an “until” loop to find the correct combination. Share your loops with a partner and see who can unlock their “door” first!

  3. Role-Playing the Great Escape

    In groups, act out the escape scene from the story. Assign roles such as Ethic, Hedge, and the guards. Use props to represent the locks and doors. Focus on using clear communication and teamwork to successfully escape!

  4. Create a Comic Strip

    Draw a comic strip that illustrates the key moments of Ethic and Hedge’s escape. Include dialogue and thought bubbles to show what the characters are thinking and saying. Share your comic with the class and discuss the different strategies Ethic could use.

  5. Programming with Loops

    Use a simple programming tool or app to create a program that simulates Hedge unlocking the door. Write a “while” loop that continues until the correct position is found. Experiment with different types of loops and see how they affect the program’s efficiency.

Upon emerging from stasis, Ethic is faced with three surprising revelations. The first is that she finds herself in a prison cell. The second is that she has complete amnesia. The third surprise is that a mysterious stranger, named Hedge, is stuck trying to squeeze through the bars of her window. Hedge has come to help Ethic save the world, but first, they need to break out of jail.

Hedge explains that each lock in the prison operates in a unique way. Inside the keyhole is a red dial that can be rotated to one of 100 positions, numbered 1 through 100. The key for a given cell will turn the dial to the correct position, which, when stopped there, changes the light to green and unlocks the door. While stealing keys from a guard is not an option, Hedge has a clever alternative. He can follow Ethic’s specific commands. For example, if Ethic instructs him to walk 5 steps forward, turn right, and then walk another 5 steps, he will do exactly that. However, Hedge needs clear instructions; vague commands like “pick the lock” or “try every combination” won’t work, but a precise command like “spin the dial 5 positions forward” will.

Once they escape the cell, they will have only a brief moment to unlock the outer prison door before the guards arrive. Ethic needs to devise a strategy that allows Hedge to efficiently open any door. A helpful programming concept for this task is called a loop, which consists of one or more instructions that Hedge can repeat a specified number of times or until a certain condition is met.

The objective is to find a way for Hedge to try every combination until one works. One straightforward solution would be to instruct Hedge to try each combination in order: check position 1, and if it doesn’t work, move to position 2, and so on, up to 100. However, this would require writing over 100 lines of code, which is inefficient. Instead, a loop can simplify the process.

Ethic could instruct Hedge to check the dial’s color, then spin the dial forward one position, repeating this for 100 iterations. This type of loop is known as a “for” loop. An even more efficient approach would be to have Hedge spin the dial one position at a time until it turns green, at which point he would stop and unlock the door. This method is called an “until” loop, as it continues until a specific condition is met. Alternatively, a “while” loop could be used, where Hedge turns the dial while it remains red and stops when it turns green.

Back to the adventure, Hedge loops through the combinations, and the cell unlocks at position 41. Ethic and Hedge wait for the right moment in the guards’ rotation and make their escape. Soon, Ethic faces a choice: hide inside a mysterious crystal or attempt to crack the outer door and make a run for it. Ethic decides to run.

The second door takes Hedge longer to unlock, requiring him to spin all the way to position 93. Once he succeeds, he explains to Ethic why he rescued her: the world is in chaos due to a robot takeover, and only Ethic can restore order. To do this, they must collect three powerful artifacts that are being misused across the land. Only then can Ethic return to the world machine—a giant crystal—to set things right. Ethic may have escaped the prison, but she is now faced with a daunting challenge ahead.

EscapeTo exit or get out of a program or process – When the game froze, I pressed the escape key to exit the program.

LocksTo secure or prevent access to a file or program – The computer locks the screen after a few minutes of inactivity to keep it secure.

DialTo enter a number or code to connect to a network or service – I had to dial the correct code to access the school’s Wi-Fi network.

LoopA sequence of instructions that repeats until a certain condition is met – In our coding class, we used a loop to make the robot move in a square pattern.

InstructionsDetailed steps that tell a computer what to do – The program followed the instructions to display the correct answer on the screen.

CombinationsDifferent ways of arranging or selecting items, often used in passwords or codes – We tried different combinations of numbers to unlock the digital safe.

PositionThe location or place of an item or element on a screen or in a program – I changed the position of the image to make the webpage look better.

UnlockTo open or gain access to a device or program – I used my fingerprint to unlock the tablet and start my homework.

CommandsInstructions given to a computer to perform a specific task – We typed commands into the terminal to create a new folder on the computer.

ProgrammingThe process of writing instructions for a computer to follow – In programming class, we learned how to create a simple game using code.

All Video Lessons

Login your account

Please login your account to get started.

Don't have an account?

Register your account

Please sign up your account to get started.

Already have an account?