Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What does the OR operator do?
Think about when at least one condition can satisfy a requirement.
What is the purpose of the NOT operator?
Consider what it means to say something is not true.
What does the AND operator (&&) do in a logical expression?
Think about a scenario where both items must be satisfied.
True or False: The NOT operator can change a true expression to false.
Think about how 'not' changes a statement.
Construct a logical expression that captures the behavior of a user being eligible for a reward if they are over 18, have been active in the last month, and their score is above 100.
Think about the eligibility criteria and use logical operators to combine them.
Write a code snippet that uses a logical expression to determine if a student is passing if they have at least 50% in subjects A & B or 60% in subject C.
Evaluate both paths of conditions to ensure passing criteria is met.
6 more questions in this section. Enroll free to practise them all.
Enroll free