subject

Write a program in Python representing 7 logic gates: AND
NAND
OR
NOR
XOR
XNOR
NOT
Accept (only) two inputs to create all outputs.
Use the if statement to perform the Boolean logic.
Only accept numeric input.
If a number is greater than 0 treat it as a 1.
Specify in your output and in the beginning of the code (through print statements) which gate the code represents.
Comment your code.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 12:00
Which of the following “invisible” marks represents an inserted tab?
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
The processing of data in a computer involves the interplay between its various hardware components.
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
Perform an online search about the booting process of a computer and list all the steps
Answers: 2
question
Computers and Technology, 24.06.2019 09:30
Atype of researcher who uses computers to make sense of complex digital data
Answers: 1
You know the right answer?
Write a program in Python representing 7 logic gates: AND
NAND
OR
NOR
XOR
Questions
question
Mathematics, 06.07.2019 04:30
question
Biology, 06.07.2019 04:30
Questions on the website: 13722360