(CGA) Checking Conditions in a Game Lesson
Checking Conditions in a Game
Conditionals - if and decision statements
An if
statement tells the computer to execute a sequence of statements only if a particular condition is true. It is sometimes called a conditional statement or a decision statement since a decision has to be made as to whether to execute the code based on the condition. A conditional always returns a true or false value.
Access the learning object below to learn more about creating and using conditional statements.
[CC BY 4.0] UNLESS OTHERWISE NOTED | IMAGES: LICENSED AND USED ACCORDING TO TERMS OF SUBSCRIPTION