AP® Computer Science Principles · Big Idea 3 · Topic 3.5
Relational Operators and Boolean Values
Watch it explained
- How it worksHow do the operators for equal, not equal, greater, and less each evaluate to true or false?
- Worked exampleFind whether each of 5 > 3, 4 = 4, and 8 < 2 evaluates to true or to false.
- Common mistakeWhy isn't a Boolean value just a 1 or a 0 you can add into an arithmetic expression?
- Going furtherWhat happens when a relational operator compares two strings instead of two numbers?
Check yourself
Your turn1 of 2
How many of the integers from 1 to 73 are strictly greater than 6?End of topic.