Conditions are statements that turn into true or false (kind of like booleans). They usually look like questions or equations, but sometimes they may just be a single variable. Everything in a computer turns into true or false eventually and the way a robot figures out if a question is true or false is by using conditions.Here’s what we’ll talk about on this page:== equalsTests to see if the statement on the left is equal to the statement on the right. If the are equal, the condition is true. If they are not equal, the condition is false.(2 == 3) is false (3 == 2 ) is false (3 == 3) is trueImportant! Make sure to keep in mind the difference between a single equals sign = and a double equals sign ==. A single equals sign is used to assign (or create) a value for a variable but a double equals signs asks a question. You can think of it this way if you have a hard time, remember that-
- Just one equals sign is going to be really bossy. It tells variables and values what to do.
- Two equals signs won’t be bossy and they will ask each other what they think.