This statement, or code, will happen as soon as the @boardname@ is activated. This means it is unconditional. We can add a condition to make code function in certain ways:
In programming we use an ‘if’ statement: if this condition is met, do something. Lets add an if statement to the code we had before; the @boardname@ will wait for the user to press a button before showing the image.
Again, test the code in the simulator. Try clicking **Button A** to display the "hello, world!" message every time the `button is pressed`.
### More 'if' statements
You could now add additional conditions to your 'if statement'. Here are some ideas:
* Change the 'get button' to ask for button B
* Add another 'if' statement within the current one, and make it so both buttons must be pressed to show the message
* Create a mini quiz that asks for one button to be pressed which represents an answer
## Else
What if the user does not press a button? What if the user presses the wrong button? We call this an else, because if the criteria of the if statement are not met then something else is done.
For example, we could make it so our @boardname@ tells us to press the A button. Remove the `button pressed` and `show string` blocks from the `if` block and right click it and select **Delete**. Now click the **If** category and drag out an `else if` block. Plug the `button pressed` and `show string` blocks in the correct places.
We want the message "Press A!" to scroll across the @boardname@, so right-click the `show string` block and select **Duplicate**. Drag this new block into the `else` section and replace the “hello, world!” with "Press A!". Your code should look like this:
So, to recap: the `forever` block makes sure our code runs forever. The @boardname@ checks if the user is pressing the left button, if the user is not then the “Press the button!” message will scroll across the LEDs. If the user is pressing the button then the “hello, world!” message will scroll across the screen. Check this in the simulator or attach the @boardname@ to the computer then click **Download** to send the code onto the @boardname@.