[Edu-sig] explaining functions [Possibly OT]
Kirby Urner
urnerk at qwest.net
Wed Dec 8 21:21:51 CET 2004
> >>> 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
More information about the Edu-sig
mailing list