2.7.2 - B. Relational (Comparison) Operators
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What will the expression 5 == 5 evaluate to?
💡 Hint: Think about what equality means.
Is 7 != 10 true or false?
💡 Hint: Look for whether the two numbers are the same.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What does the != operator do?
💡 Hint: Think of it as the opposite of equality!
If x = 15 and y = 10, what does x > y evaluate to?
💡 Hint: Compare the two numbers carefully.
2 more questions available
Challenge Problems
Push your limits with advanced challenges
Write a code snippet using relational operators to compare three numbers and print out the largest one.
💡 Hint: Consider using nested `if` statements.
Create a boolean expression to check if x is between 10 and 20 using relational operators.
💡 Hint: Think of how you can combine conditions to define a range.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.