As programs grow more and more complex, lengthy if statements and boolean expressions can make code hard to read and maintain. Fortunately, boolean expressions can often be rewritten in different forms without changing their meaning.
Back to Boolean Expressions and if Statements
Lesson PreviewLesson 6 of 8 in this unit
3.6 Equivalent Boolean Expressions: De Morgan's Laws
Part of Boolean Expressions and if Statements in AP® Computer Science A. Read the opening section, then create a free account for the full interactive lesson, practice, and progress tracking.
In this unit
8 lessons
- 3.1Boolean ExpressionsPreview lesson
- 3.2if StatementsPreview lesson
- 3.3if-else StatementsPreview lesson
- 3.4else-if StatementsPreview lesson
- 3.5Compound Boolean ExpressionsPreview lesson
- 3.6Equivalent Boolean Expressions: De Morgan's LawsThis lesson
- 3.7Comparing ObjectsPreview lesson
- 3.8EXTRA: Ternary OperatorsPreview lesson
Continue the full lesson in Stellar
Create a free account to unlock the remaining sections, checkpoints, course practice, and progress tracking for AP® Computer Science A.