Accept two input to create one output nbspnbspuse the if


4 programs in Python representing 4 logic gates:

    • AND
    • OR
    • NOT
    • XOR
  1. Accept two input to create one output.  
  2. Use the if statement to perform the Boolean logic.  
  3. Only accept numeric input.
  4. If a number is greater than 0 treat it as a 1.
  5. Specify in your output and in the beginning of the code (through print statements) which gate the code represents.

 

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Accept two input to create one output nbspnbspuse the if
Reference No:- TGS01132979

Expected delivery within 24 Hours