Recall & Review
beginner
What is conditional logic in computing?
Conditional logic is a way for a computer to make decisions by checking if something is true or false, then doing different actions based on that.
Click to reveal answer
beginner
Explain the if-then structure in simple terms.
It means: if a condition is true, then do something. If not, skip it or do something else.
Click to reveal answer
beginner
What happens when the condition in an if-statement is false?
If the condition is false, the computer skips the 'then' part and moves on to the next instructions or checks other conditions.
Click to reveal answer
beginner
How is an if-then decision like choosing what to wear based on weather?
Just like you decide to wear a raincoat if it is raining, a computer uses if-then to choose actions based on conditions it checks.
Click to reveal answer
beginner
What is the role of an else in conditional logic?
Else tells the computer what to do if the 'if' condition is not true. It is like a backup plan.
Click to reveal answer
What does an if-statement check?
✗ Incorrect
An if-statement checks whether a condition is true or false to decide what to do next.
What happens if the condition in an if-statement is false and there is no else?
✗ Incorrect
If the condition is false and no else is given, the computer skips the then-part and continues.
Which real-life example best matches an if-then decision?
✗ Incorrect
Deciding to take an umbrella only if it rains is like an if-then decision.
What does the else part do in an if-else statement?
✗ Incorrect
Else runs when the if condition is false, providing an alternative action.
Which symbol is commonly used to start an if-statement in many programming languages?
✗ Incorrect
The keyword 'if' is used to start an if-statement.
Describe how an if-then decision works using a simple real-life example.
Think about a daily choice you make based on a yes/no question.
You got /4 concepts.
Explain the difference between if and else in conditional logic.
Consider what happens when the condition is true versus false.
You got /3 concepts.