What happens in a program that uses an if block when the condition is not met? Review the following code.
1. In this program, what needs to happen for the condition in the “if” block to be met?
2. Write the program in EdScratch and download it to your Edison. What happens when you run it? Did the conditional code (the code inside the if block) run?
3. What do you think happens in a program that uses an if block when the condition is NOT met?
After you’ve run your code, go on to the next page to compare answers.
Activity adapted from [1 p. 137].