AP CSP Day 32: Lossy Compression

Big Idea 3: Algorithms & Programming
Cycle 2 • Day 32 Practice • Hard Difficulty
Focus: Boolean Logic

Practice Question

For which of the following values of x does the expression NOT (x < 3 OR x > 7) evaluate to true?
Why This Answer?

Applying De Morgan's Law: NOT(x < 3 OR x > 7) is equivalent to (NOT(x < 3)) AND (NOT(x > 7)), which simplifies to (x ≥ 3) AND (x ≤ 7). This means x must be between 3 and 7 inclusive. x = 5 satisfies this condition.

Why Not the Others?

A) x = 1: 1 < 3 is true, so (x < 3 OR x > 7) is true, and NOT of true is false. C) x = 8: 8 > 7 is true, so the inner OR is true, and NOT is false. B) x = 2: 2 < 3 is true, so the inner OR is true, and NOT is false.

Common Mistake
Watch Out!

Students incorrectly apply NOT by flipping only one part of the OR instead of applying De Morgan's Law properly. NOT distributes over OR by changing it to AND and flipping both conditions.

AP Exam Tip

De Morgan's Laws: NOT(A OR B) = NOT A AND NOT B. NOT(A AND B) = NOT A OR NOT B. Practice these until they are automatic.

Keep Practicing!

Consistent daily practice is the key to AP CSP success.

AP CSP Resources Get 1-on-1 Help
Back to blog

Leave a comment

Please note, comments need to be approved before they are published.