September 11, 2017
Lesson 2.6: Algorithm Basics
-Algorithm: like a recipe but it has to be more precise than most recipes
a: step by step procedure to perform some calculation
-each step of an algorithm must be precise and doable
-Algorithms can be expressed in many languages and in app inventor: English OR pseudocode, which is less formal than programming but more precise than English.
-Algorithms are constructed out of basic building blocks called control structures
Three basic control structures:
-Sequence, Selection, and Repetition
-Combine them in any way to create an algorithm
-Repetition: ex: loop, the repeating of the part of the algorithm used in programs.
– The repeating part of the algorithm for a specified number of times or until a condition is met.
-Sequencing: The application of each step of the algorithm (in the order in which the statements are given)
-Colors help distinguish between sequences
– The basic building blocks of algorithms
Selection: Uses a boolean (true, false) condition to decide which part of the algorithm to use.
-The Blockly Maze language is an example of a programming language. (can run on a computer)
-more formal than pseudocode
Pseudocode: More precise than English, but not as a programming language