Rocket stands by the door with his backpack. "Should I bring an umbrella?" he asks.
Raven looks out the window. "What do you notice about the sky?" she asks. "If it is raining, bring it. Else, leave it home."
Nova lights up. "That is a conditional," she says. "It makes a choice."
Let's finish two conditionals of our own. Each one needs an if and an else.
ROCKET asked: 'Should I bring an umbrella?' RAVEN answered: 'IF it is raining, THEN bring the umbrella. ELSE leave it home.' That is a CONDITIONAL; it makes a DECISION based on a question.
Finish the conditional. Write what should happen.
IF the floor is wet, THEN ____________________________ ELSE ____________________________________________
And another:
IF Mom says yes, THEN ____________________________ ELSE ____________________________________________
A conditional asks a question. The answer is TRUE or FALSE.
IF the answer is true, the THEN step runs. If it is false, the ELSE step runs.
Only one of the two steps runs each time.
IF it is raining:
take an umbrella
ELSE:
wear a sun hat | Statement | True or false? |
|---|---|
| IF the light is green, THEN go. It is green, so you go. | ? |
| The ELSE step runs when the question is true. | ? |
| A conditional helps a program make a choice. | ? |
| The THEN step and the ELSE step both run every time. | ? |