Algorithms are a sequence of ordered instructions written with precision. Algorithms tell your computer precisely what steps to take to solve a problem or reach a goal. Examples of everyday algorithms are the steps you take to brush your teeth or following the steps of a recipe to bake a cake.
Programmers are the people who create the algorithms and type the code for machines to follow.
When designing algorithms, it is important to make sure that all the steps are presented in the correct order. This is known as sequencing.
Programmers write computer programs in a language we call code. However, because no one is perfect, computer programmers sometimes make mistakes when writing their code. These mistakes are known as ‘bugs’. A complex program can be made up of lots of lines of code and it is normal for new programs to have some bugs. An important part of programming is testing your program and 'debugging' (which means removing the bugs).
In computer programming, a loop is a sequence of instructions that is continually repeated until a certain condition is reached. Loops are an essential feature of every programming language because they enable programmers to run dynamic and complex processes using a small amount of code.
Conditionals are the way computers make decisions. They are IF and THEN statements. If something is true then something happens.
This an example of a simple IF, THEN condition in Scratch.
Sometimes we want to have an extra condition in case the IF statement is NOT TRUE. This is called an ELSE statement. Below is an example of an IF, THEN, ELSE condition in Scratch
This is an example of an IF, THEN, ELSE condition in Scratch.
Events are actions that causes something to happen. An event-handler monitors for a specific event or action on a computer. When you write code for an event handler, it will be executed every time that event or action occurs. Many event-handlers respond to human actions such as mouse clicks.