Learn

Our first gate is the NAND gate. This gate receives two inputs and returns current as long as at least one of the inputs is off.

Here’s the truth table:

a b output
0 0 1
0 1 1
1 0 1
1 1 0

Instructions

1.

We’ve written most of a NAND gate in the script.py file. Finish the remaining case so all our test cases pass!

Run the file to run the test cases!

Take this course for free

By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.
Already have an account?