Coding Basics

Computers use sequences of instruction called algorithms to complete tasks. The sequence of events is like step by step instructions on how to reach its goal.

Loops are ways that a computer can do steps multiple times in a row. If you want a character in a game to take 100 steps, you might write out the action to take a step 100 times. That's a lot of work. Instead, you could write it once and say do this 100 times. Thats a lot less work for you!

Conditionals ask questions to decide what action to complete. Imagine you are choosing what to wear in the morning. If it is cold, you put on a jacket. If it is hot you put on a t-shirt. The question is what is the weather, and the action is wearing a jacket or a t-shirt.

Things called events help a computer know when to do something. When you press a button on your keyboard, it types the letter you pressed. You pressing the button is an event because when that happens, this happens. Another example is baking a cake. When the ingredients are done mixing, put the cake in the oven. When the oven is done, take the cake out.

Use this Activity to practice these skills by making a PB&J sandwich here.

Not official requirements - supplemental material

Offline Website Builder