Study Guide - I. C. T.
Study Guide - I. C. T.
I. C. T.
Over the next set of lessons, we will learn three key concepts
Sequence running instructions in order
Selection making decisions
Iteration doing something more than once
Lesson One
> Plan Four Moves
Lesson Two
> Operators and Selection
Operators symbols or keywords that perform specific operations, values, and variables. Operators are
essential in programming for making calculations, comparisons, and logical decisions.
Comparison Operators compare two values and determine their relationship. Common comparison
operators include:
Greater than (>) checks if the value on the left is greater than the value on the right. For example, 20>19
evaluates to true.
Less than (<) checks if the value on the left is less than the value on the right. For example, 20<19
evaluates to false.
Equal to (=) checks if the value on the left is equal to the value on the right. For example, 20=20
evaluates to true.
Logical Operators continue or modify Boolean (true/false) expressions. Common logical operators
include:
And returns to true only if both expressions it connects are true. For example, 20=20 and 20=19 evaluate
to false because only the first expression is correct.
Or returns to true if at least one operator is correct. For example, 20=20 or 20=19 evaluates to true
because only the first expression is correct.
Not reverses the truth value of an expression. If an expression is true, not makes it false, and vice versa.
For example, not 20=20 is equal to false because 20=20 is true.
Expressions a continuation of operations, values, and variables that the computer evaluates to produce
another value. Expressions are essential in calculations and conditions.
Selection State Worth statements that allow a program to execute a block of code based on whether
specific conditions are true or false. The most common selection statement is the if/else statement.
Lesson Three
> Using Conditional Statements and Loops
Events in the context of Scratch, events are actions or occurrences that trigger a script to run. The maze
game uses event handling to initiate actions based on the user’s input and game occurrences.
e. g. The ‘when green flag clicked’ event that allows the game to start and initializes the character’s
starting position.
Loops concise structures that repeat a block of code multiple times. In the maze game, the ‘forever’ loop
is used to continuously check for walls and implement the corresponding action. This makes sure the
character doesn’t pass through walls and shows how important loops are in the game’s mechanics.
Conditional Logic uses ‘if’ and ‘then’ statements to execute a block of code if certain conditions are met.
The maze game uses the ‘if touching color’ block to implement conditional logic.
e. g. If the character touches a wall, the game will move it back.
Coordinate System a method for locating points on a plane. In Scratch, stage uses a 2D coordinate
system where:
● X represents horizontal.
● Y represents vertical.