Transcript for:
Basics of Programming and Flow Control

Let's go! We know that humans are smarter than computers. Programmers are people who write instructions to tell a computer what to do.

These instructions are written in a language the computer understands, called code. Programmers write the code to make a program run or work. A program can be anything from moving a character across a screen, To an entire game. There are three basic flow control structures that guide how a program works and what it does. Today we are going to focus on sequence.

So what is sequence? Sequence is an order of events. As people, everything we do can be broken into a series of steps we follow to complete the task. The order of events we follow to make sure the task is completed the correct way is called an algorithm. You follow an algorithm every time you wash your hands.

First, you get your hands wet, then you get soap, you wash off the soap, and then you dry. Now, as a human, you may already know the steps you'd need to follow to do this correctly. But a computer, like a robot, would not be able to follow this same algorithm. The instructions are not detailed enough.

How do you move towards the sink? How do you turn the water on? How long do you rub your hands together? If you wanted to tell a robot how to wash their hands, or claws, you would need to include these exact specific instructions for how to do every single step.

So, what do you think happens if the sequence is written incorrectly in a program's code? You guessed it! The program won't run correctly. This is called a bug.

Depending on the mistake in your code, a bug can make programs crash, freeze, or have other things happen. Debugging, which means finding and fixing the mistakes in your code, is something that every programmer does. Just like when we make mistakes in writing or math, we have to find and fix the errors. You did it!

Now it's your turn. Practice putting commands in the correct sequence to instruct the fuzz how to get through the maze. If you have a bug in your code, just try again.