Lesson 3- Loopings Flashcards
areprogramming languagecommands for handling decisions. Specifically, perform different computations or actions depending on whether a programmer-defined evaluates to true or false.
Conditionals
or Conditional statements, conditional expressions and conditional constructs.
Types of Conditional Statements:
- If Statement
- If-Else Statement
- If-Else If-Else Statement
- Nested If Statement
- Short Hand if…Else Statement
A statement consist of a boolean expression followed by one more statement
If Statement
A statement can be followed by an optional else statement which executes when the boolean expresion is false.
If-Else Statement
A statement that consist of a Boolean expression that can be followed by another conditions, if the previous conditions were not true.
If-Else if-Else Statement
A conditional statement that has another conditional statement inside that statement
Nested If Statement
If you have only one statement to execute, one for if, and one for else, you can put it all on the same line.
Short Hand if…Else