If statements Flashcards
1
Q
What are relational operators
A
Used within an if statement to indicate a comparison
2
Q
Example of relational operators
A
Equal to –> ==
Not equal to –> !=
Less than –> <
Greater than –> >
Less than or equal to –> <=
Greater than or equal to –> >=
3
Q
What happens if you want to use multiple if statements
A
Use an elif. Short for else if
4
Q
What does the ‘in’ operator mean
A
Used to check if input is in the string