Print
Category: IceTheme
46cac4f2d5b54a7290f14901122f5c6b

Watch this CodeMonkey video to learn all about Sequencing in Computer Coding:

Read the transcript below:

Hello! Welcome to Code Monkey’s Coding Adventure.

The first topic we’re going to learn about is sequencing. Sequencing is when you put things in a certain order. For example, days of the week are in a certain sequence: first comes Monday, then Tuesday, then Wednesday, and so on.

Actually, real life runs in sequences; you probably have a plan for getting up each morning. Maybe it’s that you get out of bed, then you take a shower, you put on your clothes, you brush your teeth, and have breakfast. That’s the sequence that you run through each morning.

sequences 1

Well, code follows a sequence also, and that’s line one, line two, line three. It always runs in that order. So what that means is that when you plan your code, you gotta think of not just the commands, but also the order of those commands or the order of the actions.

Let’s take a look at an example.

Here’s an example where we want the monkey to get the three bananas. To get to that first banana, we know the monkey is going to need to step 15.

Now you could look at the monkey and see where it’s facing, and it looks like the monkey’s going to need to turn also. So we know we’re going to have a step, and we know we’re going to have a turn, but what order should we put those in? Let’s try if we would have put step 15 and then turn left.

We know those commands are right, but it looks like the order isn’t. It’s because code runs from the top of the program to the bottom. It’s going to step 15 before turning left.

We want to do the opposite, so I’m going to take this and put it below.

sequences 2

Ah, that looks right. And now we just need to do that same sort of thinking to get to the second and last banana. So now that we’ve gone over sequencing, it’s your turn.

Good luck.

Want to watch other Coding Basics Videos?

Visit the CodeMonkey YouTube channel.

ABOUT THE AUTHOR

Pam Rissmann is a middle school STEM teacher who teaches computer science, robotics, and product design. She has been teaching for 15 years, and in addition to teaching, she coaches her school’s competitive math club and STEM Girls club. Pam is a recipient of the Santa Clara County/Texas Instruments STEM teacher award and California League of Middle School Teacher of the Year for her school. Pam was awarded by Project Lead the Way the Outstanding Gateway Teacher award in 2019.