Fill an AND table
Quick review (2 minutes)
Imagine a pottery studio pickup desk.
A AND B gives true only when A and B are both true. If either input is false, the result is false.
Draw three columns. Label them A (receipt present), B (name matches) and A AND B (result). Make four rows beneath the labels.
From top to bottom, write
false/false,false/true,true/false,true/true. In each pair, put the first value under A and the second under B. Use onlytrueandfalsefor the inputs. Leave the four result spaces blank.Start at the top and work down. Tick each input that is
true. Writetruein the result column if the row has two ticks. Writefalseif it has fewer.Stop when every row has a result.
Suppose a visitor has a receipt and gives a name that differs from the tag. Only A gets a tick. That row gives false, so the piece stays at the desk.
1 In plain words
Imagine a pottery studio pickup desk. The clerk hands over a piece only when the visitor has the receipt and their name matches the name on the tag. Each thing the clerk checks is a condition. Call the conditions A (receipt present) and B (name matches).
The answer to each check is an input. On paper, write true for yes and false for no. These are the two Boolean values. Read A AND B as “Are both checks true?” Remember that both checks have to pass for the clerk to hand over the piece.
2 Picture it
Receipt and Name list the pairs false/false, false/true, true/false and true/true. AND gives false, false, false and true, in that order. The last row is marked.
3 Why
With A false, B can be false or true. With A true, B has the same two choices. Listing both choices for each value of A gives four rows and covers every pair.
The visitor can give their name even without a receipt, so the clerk can check B either way. The table assumes both answers are known and stay fixed for that row. If the tag is unreadable, the name check is undecided and the table has no row for it.
4 The rule
A AND B gives true only when A and B are both true.
If either input is false, the result is false.
5 How
- Draw three columns. Label them A (receipt present), B (name matches) and A AND B (result). Make four rows beneath the labels.
- From top to bottom, write
false/false,false/true,true/false,true/true. In each pair, put the first value under A and the second under B. Use onlytrueandfalsefor the inputs. Leave the four result spaces blank. - Start at the top and work down. Tick each input that is
true. Writetruein the result column if the row has two ticks. Writefalseif it has fewer. - Stop when every row has a result.
6 Trace
| A | B | A AND B | Explanation |
|---|---|---|---|
| false | false | false | Neither check passes. |
| false | true | false | Only the name check passes. |
| true | false | false | Only the receipt check passes. |
| true | true | true | Both checks pass. This row appears in both the receipt-present list and the name-match list. |
7 The trap
Suppose a visitor has a receipt and gives a name that differs from the tag. Only A gets a tick. That row gives false, so the piece stays at the desk.
Quick checks
Quick check 1 of 2
The name matches the tag, and the visitor has no receipt. Which input is false, and what is A AND B?
Show the steps and the answer
A is false. A AND B is false.
Why: The name check passes. The receipt check also has to pass for AND to give true.
Source: Python Software Foundation, Python 3.13 documentation, Built-in Types
Quick check 2 of 2
Suppose a school drummer needs both a drum and sticks. Drum present is true and sticks present is false. What does AND give?
Show the steps and the answer
false
Why: The missing sticks leave only one check true. AND needs both.
Source: Python Software Foundation, Python 3.13 documentation, Built-in Types
Sources
- Python 3.13 documentation, Built-in Types — Boolean Type. Python Software Foundation. Python Software Foundation License Version 2. Read 26 Nov 2026.
- Python 3.13 documentation, Built-in Types. Python Software Foundation. Python Software Foundation License Version 2. Read 26 Nov 2026.