RE: [Edu-sig] explaining functions [Possibly OT]
Dec. 8, 2004
12:21 p.m.
def ifthen(p,q): return (not p) or q
i.e. (~p | q) <-> (p -> q)
combos = ((True,True),(True,False),(False,True),(False,False))
for p,q in combos: print "Inputs: %s\t%s\tOutput: %s" % (p, q, ifthen(p,q) )
Inputs: True True Output: True Inputs: True False Output: False Inputs: False True Output: True Inputs: False False Output: True
Kirby
On more quickie regarding 'functions': I've got these integrated into a curriculum outline here: http://www.4dsolutions.net/ocn/mainoutline.html You'll see it's pretty traditional, but the context is clearly influenced by computer science. I haven't touched this document since Oct 9, 2003 but still consider it current enough to be useful in the field. Kirby
7858
Age (days ago)
7858
Last active (days ago)
0 comments
1 participants
participants (1)
-
Kirby Urner