You will write the NOT, AND and OR gates as Python functions that work on 0 and 1, and print the output column of each gate.
Your tasks.
NOT, return the opposite of a.AND, return 1 only when a and b are both 1, and 0 otherwise.OR, return 0 only when a and b are both 0, and 1 otherwise.and_column to the list of AND outputs for the rows in pairs, in order.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…