DEMO #3: Let's see how we can write programs that change depending on the user's input!

If statements, or conditionals, start with a test that compares two values. If the test statement is true, the code indented underneath runs. If the test statement is not true, the block of code underneath is skipped and the rest of the program runs.

  • Click Run and view the example on the stage. Try running it twice to see results for responding yes or no.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE