Basically. If you want an action to happen when two conditions are met, you need some kind of check to see if those conditions are met. Usually this is done in If statements. You can use more advanced things like switches or for loops, but if statements will work most of the time and are easiest for beginners to learn.