Ask your own question, for FREE!
Computer Science 13 Online
OpenStudy (osanseviero):

Hello. I am trying to show that the rules of truth tables are the same in programming. I already showed "not", "and", and "or"....how can I prove in python the conditional? (I can with some cases, but not all).

OpenStudy (osanseviero):

I wrote this program: def numero(x): if x>0: return x%2==0 But I can't show that truth table is correct for this...

OpenStudy (osanseviero):

unless the truth table of conditional of logic is not the same than in programming...

OpenStudy (e.mccormick):

Well, you would normally just use a truth table to find out what was going to happen if needed. But in programs you generally break things down to very small, simple parts. Here is a part from a book on the Python versions of truth tables... or basic logic operators: http://learnpythonthehardway.org/book/ex27.html

OpenStudy (osanseviero):

Thanks...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
2 days ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
2 days ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!