STEP 4: Let's create our first if statement! First we'll test if the user chose "beach".

The test statement has two parts: the test variable and the test value. The test value is after the ==.

  • In the LOGIC tab, click on and drag out if. Drop it at the bottom of your program.
  • Change the test value from "yes" to "beach".
  • In GRAPHICS, go to . Drag out Summer. Drop it under ····#·add·your·code·here¬

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)