using python - finish the code below for NAND and NOR #!/usr/bin/python3 import numpy as np inputs = np.array([[0,0],[0,

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

using python - finish the code below for NAND and NOR #!/usr/bin/python3 import numpy as np inputs = np.array([[0,0],[0,

Post by answerhappygod »

using python - finish the code below for NAND and NOR
#!/usr/bin/python3
import numpy as np
inputs = np.array([[0,0],[0,1],[1,0],[1,1]])
def NAND(x):
# Implement NAND Logic HERE
def NOR(x):
# Implement NOR Logic HERE
print( 'NAND:')
outputs = [ NAND(x) for x in inputs ]
print( outputs )
print( 'NOR:')
outputs = [ NOR(x) for x in inputs ]
print( outputs )
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply