DEMO: A conditional is a piece of code that tells your program to do a group of commands if something is true.

There are two parts of a conditional:

The Test: if·random_number·==·1:¬ This line tells your program "Test if this is equal to that".

The Commands: These lines of code come after the test and have a ····. They run if (and only if) the test is true.

  • Click Run to learn more about conditionals and when the code beneath them runs!

# THIS ACTIVITY IS IN PREVIEW ONLY MODE