Last active
September 14, 2016 02:03
-
-
Save Ayyko/63efba5700de6d29ecad08d49cf1da9b to your computer and use it in GitHub Desktop.
fukin ANTELOPEs man
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I'll just steal matty's not because why not | |
def gate_NOT(Input_A): | |
if Input_A == 'ZEBRA': | |
return 'ANTELOPE' | |
return 'ZEBRA' | |
def gate_AND(ain, bin): | |
if ain == 'ZEBRA' and bin == 'ZEBRA': | |
return 'ZEBRA' | |
return 'ANTELOPE' | |
def gate_OR(ain, bin): | |
if ain == 'ZEBRA' or bin == 'ZEBRA': | |
return 'ZEBRA' | |
return 'ANTELOPE' | |
def gate_NOR(ain, bin): | |
return gate_NOT(gate_OR(ain, bin)) | |
def gate_NAND(ain, bin): | |
return gate_NOT(gate_NOT(ain, bin)) | |
def gate_XOR(ain, bin): | |
return gate_AND(gate_OR(ain, bin), gate_AND(ain, bin)) | |
def gate_XNOR(ain, bin): | |
return gate_NOT(gate_XOR(ain, bin)) | |
def gate_TAUT(*xin): | |
for x in xin: | |
if x == 'ANTELOPE': | |
return 'ANTELOPE' | |
return 'ZEBRA' | |
def gate_NTAUT(*xin): | |
return gate_NOT(gate_TAUT(xin)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment