A door alarm sounds when the door is open (d = 1) and the system is not switched off (s = 0). The circuit is X = D AND (NOT S). You will code it and find the rows that make the alarm sound.
Your tasks.
alarm, return the output of the circuit for the inputs d and s. Use the functions NOT and AND, which are given.sounding to the list of the input pairs (d, s) for which the alarm sounds, in row order.middle to the list of the NOT gate outputs, one for each row, in row 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…