Fill an OR table
Quick review (2 minutes)
Imagine an apartment resident who can report a broken light by phone, by email, or by both.
For two Boolean inputs, A OR B gives true if at least one input is true. It gives false if both are false.
Assume both input values are known and refer to the same light. The paper model answers whether the resident made a report. Delivery, reading the report, and repairing the light are outside the model.
Draw the table on paper with A on the left, B in the middle, and Reported on the right.
Write the input pairs from top to bottom. Write false and false, false and true, true and false, then true and true. Start with all four Reported spaces blank.
Start at the top. Read A first. If A is true, write true in Reported. If A is false, read B and copy it into Reported.
Move down one row at a time. Stop when every Reported space has a value.
Suppose the resident phones and then emails. Does the email cancel the phone report? The phone report still counts after the email, so keep Reported true in the marked last row, where both inputs are true.
1 In plain words
Imagine an apartment resident who can report a broken light by phone, by email, or by both. In this example, any of those choices counts as a report.
Let A mean “phoned” and B mean “emailed.” These are the inputs, the facts you start with. Write true if the resident used that method and false if they didn't. True and false are the two Boolean values.
Read A OR B as “Did the resident phone, email, or do both?” Write the answer under Reported. Remember that one report is enough and both reports count. That's what inclusive means in inclusive OR.
2 Picture it
The Phoned and Emailed columns show false/false, false/true, true/false and true/true. The Reported column is blank. The last row, with both inputs true, is marked.
3 Why
If the resident phoned, you already have a report, whatever B says. If the resident didn't phone, the answer depends on whether they emailed. In that case, B already gives you the value to write in Reported.
4 The rule
For two Boolean inputs, A OR B gives true if at least one input is true.
It gives false if both are false.
Assume both input values are known and refer to the same light. The paper model answers whether the resident made a report. Delivery, reading the report, and repairing the light are outside the model.
5 How
- Draw the table on paper with A on the left, B in the middle, and Reported on the right.
- Write the input pairs from top to bottom. Write false and false, false and true, true and false, then true and true. Start with all four Reported spaces blank.
- Start at the top. Read A first. If A is true, write true in Reported. If A is false, read B and copy it into Reported.
- Move down one row at a time. Stop when every Reported space has a value.
6 Trace
| A | B | Reported | Explanation |
|---|---|---|---|
| false | false | false | No call and no email. The true-input count is zero. |
| false | true | true | The email counts as a report. |
| true | false | true | The phone call counts as a report. |
| true | true | true | Both count. Counting true inputs gives 0, 1, 1, 2, so all but the first row qualify. |
7 The trap
Suppose the resident phones and then emails. Does the email cancel the phone report? The phone report still counts after the email, so keep Reported true in the marked last row, where both inputs are true.
Quick checks
Quick check 1 of 2
The resident phoned and emailed about the same light. What goes in Reported?
Show the steps and the answer
true
Why: Both inputs are true, so the row has at least one true input.
Source: Python Software Foundation, Built-in Types: Boolean Operations (Python 3.13)
Quick check 2 of 2
A class looks in two supply drawers for a stencil. Their stencil is a sheet with a star-shaped hole for tracing a star. A means the left drawer has it. B means the right drawer has it. If A is false and B is true, what is A OR B?
Show the steps and the answer
true
Why: The right drawer has the stencil, so at least one drawer has it.
Source: Python Software Foundation, Built-in Types: Boolean Operations (Python 3.13)
Sources
- Built-in Types: Boolean Operations (Python 3.13). Python Software Foundation. Python Software Foundation License Version 2. Read 26 Nov 2026.