You will write a function that names a two-input gate from its output column, and a function that builds the 8 rows of a three-input truth table in order.
Your tasks.
name_gate, return the name of the gate in GATES whose output column equals column. Return "none" if no gate matches.rows3, return the list of the 8 input rows (a, b, c) in binary order, from (0, 0, 0) to (1, 1, 1).ones to the number of rows of rows3() for which (a NOR b) OR c is 1. The functions NOR and OR are given.Have you tried it?
Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.
Log in to join the discussion.
Loading…