Form 4: If-Then-Else Decision Making
Practice using if-then-else statements to handle multiple outcomes and direct decision-making paths.
Questions
-
MultiChoice
What does the ELSE part of an IF-THEN-ELSE statement do?
-
MultiChoice
Consider: 'IF score >= 60 THEN print Pass ELSE print Fail'. If score is 45, what is printed?
-
MultiChoice
Consider: 'IF score >= 60 THEN print Pass ELSE print Fail'. If score is 80, what is printed?
-
WordsBox
The ____ block runs when the IF condition is ____
-
MultiChoice
Why is IF-THEN-ELSE useful?
-
MultiChoice
'IF traffic light is green THEN go ELSE stop'. The light is red. What should you do?
-
MultiChoice
In an IF-THEN-ELSE structure, how many branches are executed for one test?
-
WordsBox
An IF-THEN-ELSE statement offers ____ paths based on a single ____
-
MultiChoice
'IF temperature < 0 THEN print Freezing ELSE print Warm'. Temp is -5. What is printed?
-
MultiChoice
'IF total >= 50 THEN discount = 10 ELSE discount = 0'. Total is 50. What is discount?
-
MultiChoice
Which keyword provides an alternative action when IF condition fails?
-
MultiChoice
What is the main difference between IF-THEN and IF-THEN-ELSE?