If Statements can be used to search strings.
Read the following program and then try it:
AND, OR, AND NOT
These 3 words can be used to add on to if statements.
In the example above, we used OR to check for multiple things in the variable.
NOTE: you cannot do this:
This will give you an error. You must complete your comparison fully before adding on another one!
AND will look to see if both comparisons are true:
This sees if you have both things in the word, not just one. The OR case lets you have either one.
AND NOT means basically the opposite of what you're comparing.
This means you want "a" to be in the word and you don't want "b" to be there
Lesson 6 EPIC Assignment (Difficulty 7/10):
Make the game Hangman with the following conditions:
BONUS: Do this in under 30 lines!